Exile on Earth

Following a trial by the Time Lords, Third Doctor spent some years as an exile on Earth.

The trial
Following the defeat of the War Lord's allies, a triad of Time Lords tried the Doctor for violations of their non-interference policy. (DW: The War Games)

Unbeknownst to the Doctor at the time, the Celestial Intervention Agency stepped in and appealed for a stay of execution. (DW: The Deadly Assassin)

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

Neither of these sentences were promulgated immediately.

Pre-exile
For an unknown time between trial and exile, the Second Doctor seemed to be based on Gallifrey. He was used by the CIA on limited missions to and from his home planet. (PDA: World Game, DW: The Two Doctors)

The Second Doctor's exile
At some point after his direct involvement with the CIA, the Time Lords carried out the first of their sentences:  the Second Doctor was exiled to Earth. He spent most of his exile living in comfort at the upmarket Carlton Grange Hotel. (TVC: Action in Exile) During this period, he became famous, as evidenced by his appearance in news stories (TVC: The Brotherhood) and on television game shows. (TVC: The Night Walkers)  Ultimately, the Time Lords brought this period of the Doctor's life to an end by sending animated scarecrows to trap the Doctor in his TARDIS and carry out the second of his two sentences: regeneration. While the Doctor regenerated, the Time Lord-controlled scarecrows made the TARDIS dematerialize and then departed.

Post-sentencing
The newly-regenerated Doctor's TARDIS eventually re-materialized in the Oxley Woods at the same time as an invasion by the Nestene Consciousness, in the late 20th century. An adventure followed, in which the Doctor helped UNIT defeat the Nestene Consciousness's Autons. The Doctor would stay on as UNIT's unpaid scientific advisor in exchange for a place to park the TARDIS and technical resources he needed to repair his ship. (DW:Spearhead from Space)

To ensure the Doctor would remain in exile, they removed certain secrets of time travel from his mind. (DW: The Claws of Axos) Chief amongst these were the materialization codes needed to operate the TARDIS. (DW: Spearhead from Space) Indeed, the dematerialization circuit itself was damaged beyond the Doctor's ability to repair it. (DW: Terror of the Autons, The Three Doctors)

The Master and the Errand Boy
While based on 20th century Earth, a Time Lord appeared to warn the Doctor of the coming of the Master, an indirect way of sending him on a mission to defeat the Master's plots. (DW: Terror of the Autons).

This individual appearance of a Time Lord prefigured a period of time in which the Time Lords allowed the Doctor occasional reprieves from exile. When it suited their purposes, the Time Lords would send the Doctor on controlled flights away from Earth on specific missions. The Time Lords allowed the Doctor full use of his TARDIS to stop the Master on an Earth colony in the future (DW: Colony in Space). Later, they allowed him to travel to Peladon for unspecified reasons (DW: The Curse of Peladon). They also sent him on a direct mission to convey a message to Ky, a Solonian (DW: The Mutants).

The end of the exile
As a reward for defeating Omega, the Time Lords rescinded the Doctor's exile on Earth, granting him his lost memories as well as a brand new dematerialization circuit. (DW: The Three Doctors)