Following the defeat of the War Lord's allies, a triad of Time Lords tried the Second Doctor (Patrick Troughton) for violations of their non-interference policy.

Unbeknownst to the Doctor at the time, the Celestial Intervention Agency stepped in and appealed for a stay of execution.

The Time Lord tribunal said that they would sentence the Doctor to two punishments: Exile on Earth during the late 20th century and an involuntary regeneration into a new, less-recognizable incarnation (Jon Pertwee).

More Info: tardis.wikia.com