External beam radiation for prostate cancer uses high-energy beams, such as X-rays or protons, to kill cancer cells. During the treatment, the high-energy beams are generated by a machine called a linear accelerator that aims the beams at your prostate gland.