After contracting radiation poisoning on the planet Metebelis 3, the Third Doctor makes his way back to UNIT headquarters, where the Time Lord K'Anpo Rinpoche aids him in regenerating (Planet of the Spiders).
In his new incarnation, the Doctor draws back from continuous involvement with UNIT (with which he had worked closely as the Third Doctor) and the Time Lords. The Time Lords continue to send him on occasional missions, including an attempt to prevent the creation of the Daleks (Genesis of the Daleks), during which he also meets a new adversary, Davros. The Doctor travels with journalist Sarah Jane Smith, whom he had befriended prior to his regeneration, and, for a time, with UNIT Surgeon-Lieutenant Harry Sullivan.
The Doctor's companionship with Sarah is ended when he receives a telepathic summons to Gallifrey, as humans were not then allowed on the planet. The summons is part of a trap set by his enemy the Master, who has used up all his regenerations and become little more than a withered husk. The Master frames the Doctor for the assassination of the President of the High Council of Time Lords. In order to avoid execution the Doctor invokes an obscure law and declares himself a candidate for the office, giving himself the time he needs to defeat the Master. (The Deadly Assassin)
The Doctor is seen to travel alone for the first time since season 11, returning to a planet he had visited centuries before. During his previous visit, he had accidentally imprinted a human colony ship's powerful computer, Xoanon, with his own mind, leaving it with multiple personalities. On his second visit the Doctor is remembered as an evil god by the descendants of the colonists, some of whom had become a warrior tribe called the Sevateem. After the Doctor cures the computer, one of the Sevateem, Leela, joins him on his travels (The Face of Evil). The Doctor brings the intelligent but uneducated Leela to many locales in human history, teaching her about science and her own species' past. In Victorian London, the pair encounters the magician Li Hsien Chang and his master, the self-styled Weng-Chiang (The Talons of Weng-Chiang). Later, the Doctor and Leela visit the Bi-Al Foundation medical centre, where they acquire the robot dog K-9 (The Invisible Enemy).
The Doctor returns to Gallifrey and declared himself Lord President, based on the election held during his previous visit. This is a ploy to reveal and defeat a Sontaran invasion plan. Leela and K-9 decide to remain on Gallifrey; the Doctor comforts himself by producing K-9 Mark II (The Invasion of Time).
Shortly afterwards, the powerful White Guardian assigns the Doctor to find the six segments of the Key to Time, sending a young Time Lady named Romana to assist him. The two Gallifreyans find the six segments and defeat the equally powerful Black Guardian, who sought the Key for himself. After the conclusion of the quest, Romana regenerates into a new form (Destiny of the Daleks).
For a time, the Fourth Doctor and the second incarnation of Romana travel in another universe known as E-Space. There, they are joined by the young prodigy Adric. When the Doctor finds a way to leave E-Space, Romana and K-9 Mark II choose to remain behind. Adric and the Doctor are joined by the aristocratic orphan Nyssa of Traken and, in the Fourth Doctor's last adventure, by the opinionated Tegan Jovanka.
The conduit between E-Space and our own universe is revealed to be a Charged Vacuum Emboitment (CVE) — created by the mathematicians of Logopolis as part of a system to allow the Universe to continue on past its point of heat death. As he investigates this, the Fourth Doctor begins experiencing ominous feelings and spots a white-clad entity, "The Watcher," observing him. After succeeding in stopping the Master from disrupting the CVEs and destroying the universe, the Fourth Doctor is mortally wounded when he falls from the Pharos Project radio telescope control tower, where he utters his last words: "It's the end -- but the moment has been prepared for." The Watcher is revealed as a manifestation of the Doctor's future incarnation. Before the eyes of the Doctor's companions, the Watcher merges with the Fourth Doctor, regenerating him into the Fifth Doctor.
The Fourth Doctor appears once more in the 20th anniversary special The Five Doctors. A renegade Time Lord attempts to pull the first five incarnations of the Doctor out of time, inadvertently trapping the Fourth Doctor (and Romana) in a "time eddy" from which they are later freed.
The Fourth Doctor is a natural bohemian who permanently left UNIT in order to return to a life of deep universal wandering. More so than his previous incarnations, he is thrilled by discovery and adventure. Galvanised by higher purpose, he is disarmingly loopy (constantly offering friends and foes jelly babies), brilliant and entirely serious, all at the same time. To an extent, the Fourth Doctor is the most unpredictable of his incarnations, befuddling all with his intelligence, constantly leaving others wondering if they have his full attention and using his more off the wall mannerisms against adversaries to distract them while arranging to take control of the situation. His keen judge of character also enables him to navigate his way through situations with new people, helping him to discern friend from foe. Although like all his selves he prefers his brain over his brawn, he is a capable swordsman and wrestler, following on from the martial expertise of his immediate former self. He improvises non-lethal weaponry when necessary (Genesis of the Daleks) but was also not averse to more lethal weaponry as a necessity, against both sentient and non-sentient beings (The Invasion of Time, The Talons of Weng-Chiang).
Despite his charm and offbeat humour, the Fourth Doctor is arguably more aloof and sombre than his previous incarnations. He could become intensely brooding, serious and even callous, and would keenly scrutinise his surroundings even when playing the fool. He could also be furious with those he saw as stupid, frivolous, misguided or evil. When taking charge, he could be considered authoritative to the point of egocentricity, but as it is, he is usually the only one capable of solving the situations he finds himself in. He openly maintained his distance from the Time Lords even after they had lifted his exile, although he resented that they were now capable of re-entering his life when they deemed it necessary. Not only did he seem more inclined towards a solitary existence (The Deadly Assassin), he also emphasised his distance from humanity, although he stated on more than one occasion that he found mankind to be his favourite species.
Two of the Doctor's most significant companionships occur during his fourth incarnation. His friendship with Sarah is implied to be deeper than the relationships he shared with other companions to that point (as alluded to in the Tenth Doctor episode School Reunion). She is consequently still profoundly affected by their separation many years later in her personal timeline. His relationship with Romana (specifically her second incarnation) borders on romantic attraction while being bolstered by her capacity to maintain pace with his mental processes. The largest proof of his influence on her is when she chooses to exile herself from Gallifrey to explore new worlds and help others, as he himself has done.
Imposingly tall, with eyes that seem to constantly boggle, a mass of curls for hair and prominently displayed teeth, the Doctor favours an outfit that usually consists of a shirt, waistcoat, wide-legged trousers, a frock coat (with pockets containing a seemingly endless array of apparently useless items that would nevertheless suit the Doctor's purposes when used), a wide-brimmed hat (on occasion) and, most famously, his impractically long, multicoloured striped scarf, which was apparently knitted for him by Madame Nostradamus (whom he refers to as a "witty little knitter").
When John-Nathan Turner became the show's producer in Baker's last year, the Fourth Doctor was the first to sport an item of clothing adorned with red question marks as a motif, in this case above the points on his shirt collars.
The Doctor Who Site