Guardians of the Edge

The Guardians of the Edge were aspects of the Thirteenth Doctor's psyche based on the vestiges of her past incarnations, who manifested out of her refusal to complete the forced regeneration imposed on her by. They sat beside the Edge of Existence, the symbolic place in the Doctor's mind where if she passed, she would cease to exist and allow the Master full control of their body. Although each Guardian maintained their own individual personality similar to that of the incarnation they appeared to be, they acted together as one being. (TV: The Power of the Doctor)

History
When initiated a forced regeneration on the Thirteenth Doctor, he used the regeneration to transplant himself into her body. As the Master became accustomed to the Doctor's body, the Thirteenth Doctor found herself in her own mind, in an arid wasteland with nothing but telephone wires. She then noticed an apparition of the First Doctor wearing black robes with red embroidery, sitting by one of the telephone poles, who remarked that by refusing to "pass through" her incarnation had "quite the strength of character". He then took the appearance of an elderly Sixth Doctor, asking what they would do about the predicament, and that it couldn't be ruined for "the next one". He then morphed into an older Fifth Doctor, who reflected that the Thirteenth Doctor was "doing so well."

The Thirteenth Doctor expressed confusion regarding where she was, with her last memory being forced to regenerate. The Guardians took the form of the Eighth Doctor, wearing not robes but his Victorian adventurer's attire, who answered that this was the very reason they were there, to stop her from progressing any further. He told her, "You are not finished," and changed into the form of the First Doctor to add: "We are not finished." The Guardians continued to switch between these incarnations, explaining they were vestiges of the Doctor's own consciousness from fragments of their past, the "Guardians of the Edge". As evidence of this, when the Thirteenth Doctor asked why the manifestation of the Eighth was not wearing robes like the others, he acknowledged this — saying "I don't do robes" — and bickered with the Seventh, who said there was "always one... [who had] to be different."

The Thirteenth Doctor asked the Guardians what the aforementioned Edge actually was. Continuing to morph between incarnations, they told her that it was the symbolic edge of this incarnation's existence, the point of no return after which there would be no way back. They reminded the Doctor that time was running out, but their body was still weak from the forced regeneration. As the Doctor realised that this meant it was reversible, she turned in gratefulness to the Guardians for giving her the motivation she needed, only to find the rock they had sat upon was empty.

Although she was not physically present anymore, the Doctor's conversation with the Guardians of the Edge seemingly influenced the Holo-Doctor, who briefly morphed into the faces of the Guardians before resolving to reverse the forced regeneration. When meeting Tegan and Ace, the hologram changed to similarly older versions of the Fifth and Seventh Doctors respectively, though they said this was due to the companions' "emotional memory".

Finally, when the Holo-Doctor and the Doctor's companions and allies initiated the forced regeneration to reverse the process, the Guardians told the Thirteenth Doctor to focus and wished her good luck, as her body was restored. (TV: The Power of the Doctor)

Appearance
The Guardians appeared as older versions of the First, Fifth, Sixth, Seventh and Eighth Doctors. They wore red gowns and black robes, with the exception of the one representing the Eighth Doctor, who wore clothes similar to those he wore before his own regeneration on Karn. They were able to morph fluidly between each other. (TV: The Power of the Doctor)

Behind the scenes

 * While the absence of late Second Doctor, Third Doctor, and War Doctor actors Patrick Troughton, Jon Pertwee and John Hurt was understandable because of their deaths, Fourth Doctor actor Tom Baker was invited to take part in the Special, but was unavailable, with Chris Chibnall explaining "''We asked Tom, but sadly he could not do it. He was not available. Such a shame.".
 * Other accounts have indeed portrayed past incarnations of the Doctor residing within their mind after having regenerated. (PROSE: Into the Silent Land, Timewyrm: Revelation) The Eighth Doctor experienced a similar mindscape which enabled him to communicate with aspects of his Fifth, Sixth and Seventh incarnations. (AUDIO: Zagreus)