The Master's Dalek Plan

The Thirteenth Doctor's forced regeneration was imposed on her by as part of his so-called "Master's Dalek Plan" to ruin the Doctor's reputation. However, it was reversed by Yaz with the assistance of the Holo-Doctor. (TV: The Power of the Doctor)

Origins
Following his creation of the CyberMasters and confrontation of the Thirteenth Doctor on Gallifrey, (TV: The Timeless Children) the Master sought to sully the Doctor's title throughout the universe by hijacking her body and wreaking havoc in her name. To achieve this, he enlisted the help of the Daleks and CyberMasters, winning their support by promising to remove their common enemy. The Master also took Rasputin's place in history and hypnotised Tsar Nicholas II into allowing him to use the Winter Palace for his operations, such as the setup of connected regeneration chambers from Gallifrey.

Using the power of the Qurunx, the Master ultimately succeeded in forcing the Thirteenth Doctor into the chambers and triggering her forced regeneration, hijacking the Doctor's body while leaving his own body motionless in the chamber. (TV: The Power of the Doctor)

The new regeneration
Following the forced regeneration, the Doctor's new body had the Spy Master's appearance and personality, and he forced Yaz to be his companion by threatening her with the Tissue Compression Eliminator. With both the Doctor's body and their TARDIS in his possession, the Master began to cause conflicts and destruction in the Doctor's name.

"I'm going to make the Doctor a byword for fear, pain and destruction, so when people hear that name in future, they quake in fear."

- TV: The Power of the Doctor

From a moon, he watched two planets destroy each other as a result of his plots, and he called out to a visiting hover camera that "I am the Doctor. And I caused this." However, Yaz pushed him out of the TARDIS and fled. He remained on the planet, playing a slow tune on the Doctor's recorder.

Yaz eventually returned, feigning regret for abandoning him. Together they travelled back to the Winter Palace, where he gave the orders for the Daleks and Cybermen to begin their invasion of Earth. (TV: The Power of the Doctor)

Reversal
While the Master's plan was being carried out by him in the Doctor's new body, the Thirteenth Doctor remained in their mind, refusing to complete the regeneration. Her refusal to change manifested itself as the Guardians of the Edge at the Edge of Existence, who explained to her they had stopped her from passing the Edge, which would "let the Master permanently hijack [their] existence". With their encouragement, the Doctor realised that the newly regenerated body was still unstable.

The Doctor's AI hologram seemingly picked up on this, and came up with a plan. The Holo-Doctor assisted the Doctor's former companions, including Tegan Jovanka and Ace, to thwart the CyberMasters' and Daleks' invasion plans. Finally, Yasmin Khan and Inston-Vee Vinder cornered the new "Doctor" and forced him back into the chamber, using the CyberMasters' regeneration energy to cause a "forced degeneration" that brought back the Thirteenth Doctor and forced the Master back into his body, gravely weakening him as a result. However, after the restored Doctor had the Qurunx free itself with its energy beam, the Master managed to use his TCE to aim the beam at her, leading to her regeneration into the true Fourteenth Doctor. (TV: The Power of the Doctor)

Appearance
During the forced regeneration (and later degeneration), the Doctor and the Master's bodies glowed with both golden regenerative energy as well as red energy from the Qurunx's beam.

Following the forced regeneration, the Doctor's regenerated body was identical in appearance to. After emerging in the Thirteenth Doctor's clothes, the Master quickly chose a new outfit for himself in the TARDIS wardrobe which incorporated elements of several previous incarnations' costumes in a caricature of the Doctor, including the Thirteenth Doctor's coat, the Tenth Doctor's shirt and necktie, the Seventh Doctor's pullover, the Fourth Doctor's scarf, the Fifth Doctor's celery and the First Doctor's checked trousers. He also carried the Second Doctor's recorder. (TV: The Power of the Doctor)

Behind the scenes
Through this forced regeneration Sacha Dhawan is the first actor to have portrayed both the Master and the Doctor within the same story. As this forced incarnation came directly after the Thirteenth Doctor, Sacha Dhawan technically portrayed a possible version of the Fourteenth Doctor, although the Thirteenth Doctor's conversation with the Guardians of the Edge also makes clear that the Doctor's actual next regeneration (as played by David Tennant) was supposed to be a separate individual.