Computer Simulation of Thermally Activated Processes: Theory, Algorithms, and a Few Case Applications to Surface Chemistry