The Doctor is the main character of the Popular British Sci-Fi show Doctor Who. He is a Time Lord that has had 13 forms.
The Doctor left Gallifrey and became a hero who fought evil and injustice across the universe in violation of the Time Lords' non-interference policy. Technically, he explored only with the intention of experiencing the wonders of the universe and having fun, but frequently became embroiled in machinations and crises that ended with him defeating the foe and saving the planet he was visiting. He traveled with many companions, beginning with his granddaughter, Susan Foreman, who also came from Gallifrey.
Eventually, he was called to account for his crimes against the Time Lords during his second incarnation, when he called them to stop the War Lord and return kidnapped humans to their own era. His punishment was a forced regeneration, exile to Earth in the 20th century, and the loss of his knowledge of how to control the TARDIS. This knowledge was restored to him after he helped to defeat Omega.
Afterwards, he resumed having adventures with many companions in his following incarnations. Early in his Fourth incarnation he was sent by the Time Lords to prevent the creation of the Daleks, but despite having the chance he refrained from committing genocide. After this he kept the Black Guardian from obtaining the Key to Time, achieved the office of Lord President of Gallifrey, and was again put on trial in his sixth incarnation for breaking the non-interference policy again. He discovered that the Prosecutor, the Valeyard, was a personification of his future evil, who was helping to cover up the crimes of the High Council of Time Lords.
During The Last Great Time War between the Time Lords and the Daleks, the Eighth Doctor refused to be a part of it. He died in a spaceship crash on Karn, but was revived by the Sisterhood of Karn, and agreed to regenerate into a Warrior. The Doctor then fought in the War. He ultimately ended the war, but was able to save Gallifrey with the help of his other twelve incarnations. This displacement of Gallifrey caused the near-extinction of the Daleks. Gallifrey and the war were sealed in a time lock, making it impossible to time travel to either.
For details on the Last Great Time War and its survivors, see the separate article.
In an alternate timeline, the Doctor's grave was on Trenzalore, where he had died after a battle. The Doctor was buried in his TARDIS. Instead of a body, the TARDIS contained the Doctor's time stream, manifesting as a column of light. The Great Intelligence forced the Eleventh Doctor to go to Trenzalore to open the TARDIS, though it was opened by a data ghost of River Song. The Great Intelligence entered the timestream to alter the Doctor's history, but the Doctor was saved by Clara Oswald scattering herself through his timestream. Due to this Clara had helped the Doctor many times through his lives, even telling him which TARDIS to steal.
The War, Tenth and Eleventh Doctors were brought together by the Moment to try to change the fate of Gallifrey and the Time Lords. Bringing together all of his incarnations together at once, the Doctor succeeded in freezing Gallifrey in a pocket universe but only his eleventh self would remember this.
Eventually the time came for the Doctor to go to Trenzalore where he was fated to die in battle. The Doctor spent centuries protecting the town of Christmas from various enemies including the Daleks, Cybermen, Sontarans and Weeping Angel as the Time Lords were trying to return to the universe through a crack in time there. Growing extremely old and frail, the Doctor came to the end of his life as he no longer possessed the ability to regenerate. At the moment he was to be killed by the Daleks, the Time Lords intervened at the request of his companion Clara Oswald, granting him a new regeneration cycle and allowing him to defeat the Daleks and become the Twelfth Doctor, changing his personal future.