William Hartnell's Doctor said right at the beginning that he and Susan were exiles from their home planet, but that 'one day we will go back' - but it's never been clarified specifically as to why he left. Patrick Troughton carried on running from the Time Lords, but in his final story, The War Games, he had to ask them for help to put things right after the War Lords, helped by a renegade Time Lord, had been taking soldiers out of their original time zones and using them in the War Games.
Once the crisis was over, the Time Lords forced the Doctor to return to Gallifrey and put him on trial for crimes against Time Lord non-interference laws (not the same trial as the one the Valeyard participated in, that was later). His companions Jamie and Zoe were put back in their proper time-streams, just after their first adventure with the Doctor, but before they left with him in the TARDIS. The Doctor was sentenced to be exiled to Earth, and the secret of how to travel in the TARDIS was taken from his memory. He objected that it could be very embarrassing for he him to be exiled on Earth, as he was already known there, so the Time Lords agreed to change his appearance (it could actually be argued that this wasn't a true 'regeneration' which could mean that even if there was an extra Doctor between 8 & 9, 11 would still be 11)
So the Doctor changed to Jon Pertwee, was sent to Earth in the TARDIS and spent the next few years working for UNIT, with the Brigadier, who he had already met in The Web of Fear (the second Yeti/Great Intelligence story) and Invasion (a Cybermen story) and trying to fix the TARDIS.
After saving the Earth a few times, the Doctor was allowed out on a leash by the Time Lords, giving him journeys in the TARDIS controlled by them to go to solve problems they wanted sorted. Eventually, after he saved Gallifrey in the Three Doctors (the 10th anniversary special) he was given complete freedom, though the Time Lords did occasionally still send him on missions or recall him to Gallifrey to solve their problems. After one of these adventures he almost accidentally became the President of the Time Lords, but promptly left again.
The White Guardian who sent him on The Key to Time mission was not actually a Time Lord, he was an anthropomorphic representation of order, as opposed to the Black Guardian, who represented chaos. Though presumably the Doctor was sent with the Time Lords co-operation as he was given Time Lady Romana as a companion.