The photons and the electrons present in the radiation source ionizes the water molecules producing free radicals (OH radicals), which in turn ionizes the atom present in the DNA molecule. Generally normal cells have excellent repair mechanisms but cancer cells are have diminished ability to repair the damages and hence continue to produce cells with the damage. These cells, which have the damaged DNA, will either die or reproduce slowly.
One major limitation of radiotherapy is that solid tumors can develop resistance to it. This is due to the fact that solid tumors outgrow their blood supply and there is low oxygen environment (hypoxia). The more the tumor is hypoxic the greater is resistance to radiotherapy because fixation of oxygen plays a very important role in causing permanent damage to the DNA.