We discuss molecular-dynamics simulations of ion damage in silicon, with emphasis on the effects of ion mass and energy. We employ the Stillinger-Weber potential for silicon, suitably modified to account for high-energy collisions between dopant-silicon and silicon-silicon pairs. The computational cells contain up to 106 atoms and these are bombarded by B and As atoms at incident energies from 1 keV up to 15 keV. We show that the displacement cascade results in the production of amorphous pockets as well as isolated point defects and small clusters with populations which have a strong dependence on ion mass and a weaker relationship to the ion energy. We show that the total number of displaced atoms agrees with the predictions of binary collision calculations for low-mass ions, but is a factor of 2 larger for heavy-ion masses. We compare the simulations to experiments and show that our results provide a clear and consistent physical picture of damage production in silicon under ion bombardment. We studied the stability of the damage produced by heavy ions at different temperatures and the nature of the recrystallization mechanism. The inhomogeneous nature of the damage makes the characterization of the process through a single activation energy very difficult. An effective activation energy is found depending on the pocket size. We discuss our results considering the Spaepen-Turnbull recrystallization model for an amorphous-crystalline planar interface.