Recently it has become feasible to calculate energy deposition and particle transport in the body by proton and neutron radiotherapy beams, using Monte Carlo transport methods. A number of advances have made this possible, including dramatic increases in computer speeds, a better understanding of the microscopic nuclear reaction cross sections, and the development of methods to model the characteristics of the radiation emerging from the accelerator treatment unit. This paper describes the nuclear reaction mechanisms involved, and how the cross sections have been evaluated from theory and experiment, for use in computer simulations of radiation therapy. The simulations wilI allow the dose delivered to a tumor to be optimized, whilst minimizing the dose given to nearby organs at risk.