The use of high-energy rays (such as X-rays) or particles to kill or shrink cancer cells.