A comprehensive three-dimensional Monte Carlo computer code, Ion Transport in Materials and Compounds (ITMC), has been developed to study in detail the surface related phenomena that affect the amount of sputtered atoms and back-scattered ions and their angular and energy dependence. A number of important factors that can significantly affect the sputtering behavior of a surface can be studied in detail, such as having different surface properties and composition than the bulk and synergistic effects due to surface segregation of alloys. These factors can be important in determining the lifetime of fusion reactor first walls and limiters. The ITMC Code is based on Monte Carlo methods to track down the path and the damage produced by charged particles as they slow down in solid metal surfaces or compounds. The major advantages of the ITMC code are its flexibility and ability to use and compare all existing models for energy losses, all known interatomic potentials, and to use different materials and compounds with different surface and bulk composition to allow for dynamic surface composition changes. There is good agreement between the code and available experimental results without using adjusting parameters for the energy losses mechanisms. The ITMC Code is highly optimized, very fast to run and easy to use.