Exile on Earth

Following a trial by the Time Lords, the Third Doctor spent a number of 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. During this time, he may have been accompanied by two of his pre-trial companions, Jamie McCrimmon and Victoria Waterfield, as well as on one occasion by the Time Lady Serena, who was killed in action. (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. The Doctor experienced a period of unconsciousness and partial amnesia, but he recovered and helped UNIT defeat the Nestene Consciousness's Autons. The Doctor agreed to 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, the Time Lords 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) This didn't stop the Doctor, with the help of his UNIT assistants Dr. Liz Shaw and, later, Jo Grant, from attempting to repair the TARDIS. At one point this led to the Doctor accidentally breaking the First Law of Time by creating a minor paradox in which he and Jo encountered future versions of themselves. (DW: Day of the Daleks)

During his exile, the Doctor adopted a "surrogate TARDIS" of sorts in the form of Bessie, an automobile the Doctor modified for speed. He also designed and built a vehicle capable of flight, though he only used it on a few occasions.

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). For a period of time thereafter, the Doctor repeatedly encountered the Master and foiled his various plots (DW: The Mind of Evil to The Dæmons, inclusive).

The appearance of the Time Lord who warned the Doctor of the Master's return 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
In an effort to defeat the renegade Time Lord Omega, the Time Lords took the unprecedented step of not only recruiting the Doctor's third incarnation, but also his first and second as well (although due to technical issues, the first Doctor was only able to contribute advice). As a reward for the successful defeat of Omega, the Time Lords finally rescinded the Doctor's exile on Earth, granting him his lost memories as well as a brand new dematerialization circuit. (DW: The Three Doctors)

Despite his exile coming to an and, the Doctor continued to work with UNIT on a regular basis and retain his home base there for the remainder of his third incarnation. Following his regeneration, however, the new Doctor finally took full advantage of his freedom and quickly weaned himself away from UNIT, save for the occasional collaboration (DW: Robot, Terror of the Zygons, The Android Invasion, etc.), and also took part in adventures on Earth on a less-frequent basis than he'd done previously, although he never officially resigned from UNIT .(DW: The Poison Sky)