The Valeyard

The Valeyard was an entity created "somewhere between the Doctor's twelfth and final incarnations", perhaps the essence of the Doctor's dark side from that time.

First Meeting with the Doctor
Other than a cryptic hint as to the Valeyard's origins as the Doctor's future self, or part of his self, the origins of the Valeyard were unknown. According to the Master, the Valeyard was the personification of all that was evil within the Doctor, estimated to have been taken from somewhere between his twelfth and final incarnations. (DW: The Ultimate Foe)

The Valeyard served as the prosecutor during the trial of the Doctor. He presented extracts from the Matrix depicting past events in the Doctor's life as evidence of the Doctor violating the non-interference policy of the Time Lords. (DW: The Mysterious Planet, DW: Mindwarp) Later in the trial he added a charge of genocide against the Vervoids. (DW: Terror of the Vervoids)

The Valeyard had secretly tampered with the Matrix extracts to show the Doctor in the worst possible light and steer the trial to a guilty verdict. The Valeyard was acting on behalf of the High Council to cover up the Ravolox affair. As payment, the Valeyard was to have received the Doctor's remaining regenerations. The Master stepped in and revealed the Valeyard's true motives. (DW: The Ultimate Foe)

The Valeyard escaped into the Matrix via the Seventh Door, which he opens using a copy of the Key of Rassilon. He was pursued and finally defeated by the Doctor when an explosion the Valeyard had intended to destroy the court was fed back into the Matrix due to the Doctor's tampering.

However, as Inquisitor Darkel dismissed the trial and the Doctor and his companion departed, the Valeyard was also present, disguised as the Keeper of the Matrix. (DW: The Ultimate Foe)

Return
The Valeyard returned and tangled with the Doctor in his seventh incarnation, revealing now his mastery of the Dark Matrix, a counterpart of the normal Matrix. (PDA: Matrix)

False Valeyards
When the Doctor found himself in an alternate version of London created by Ashley Chapel's use of the Millennium Codex, he began to manifest magical powers in keeping with the new unstable universe's laws of physics. However, using these powers began to transform him into the Valeyard. This was not the actual Valeyard, but a manifestation of the Doctor's worst fears. (MA: Millennial Rites)

Years later, a creature called the Es'Cartress of the Tactire assumed the form of the meta-crisis Doctor, in order to steal the Doctor's memories. Prior to revealing his true identity, the Es'Cartess suggested to the Doctor that he was in fact the Valeyard. The Doctor dismissed this suggestion, leading to the revelation of the Es'Cartess's identity. (IDW: The Forgotten)

Other timelines
In one timeline, the Valeyard defeated the Doctor and went on to wreak havoc throughout time and space. (DWU: He Jests at Scars...)

Personality
In certain aspects, the Valeyard was similar to several of the Doctor's incarnations, quite cunning and verbal, with a knack for manipulation. He had a bit of a temper, and was prone to outbursts, but generally calm and collected, a trait numerous incarnations of the Doctor exhibited.

Behind the scenes

 * John Nathan-Turner, Doctor Who's producer at the time, and his script editor Eric Saward, who, with Robert Holmes, wrote the script, came across some creative differences which occurred between the writing of the original version of The Ultimate Foe and its production. Because of this, some of the background behind the Valeyard was lost. With Saward refusing to allow any elements of the second episode, the fourteenth and final episode of Trial of a Time Lord as a whole, Pip and Jane Baker ended up patching up the continuity without, for legal reasons, reference to the scripts. An earlier draft of The Ultimate Foe had made it clear that the Doctor would definitely, at some stage, turn into the Valeyard, desperate to extend his life after his remaining regenerations had run out, a not dissimilar situation to the one faced by the Master. The creative dispute had arisen from the dark nature of these and other developments in the script, with John Nathan-Turner not favouring such a downbeat approach.
 * With the events of Journey's End, some fans began to wonder as to whether or not the meta-crisis Doctor would eventually become the Valeyard. The events of IDW: The Forgotten lent some credence to this. Some of this credibility was lost, however, when this entity was revealed to be a Cranial Parasite attached to the Doctor, right after the events on the Crucible.
 * Writer's guidelines for the Virgin New Adventures specifically asked writers not to discuss about the continuity issues created by the Valeyard or the Doctor's trial in The Trial of a Time Lord and took the official line that those events had taken place in the Doctor's personal future. Some novels, however, such as Love and War by Paul Cornell, among others, did.
 * The Valeyard appeared in the un-authorized fan novel charity publication Time's Champion begun by Craig Hinton and completed by Chris McKeon.
 * The Valeyard shares similarities with the Dream Lord, who is also the dark side of the Doctor. (DW: Amy's Choice) Some fans speculate the Dream Lord may be an earlier manifestation, in a dream brought on by Psychic Pollen, of what would become the Valeyard, in physical embodiment. To date, no direct connection, in-universe or by any reliable sources, has been made between the characters.