When terrifying events threaten Coal Hill School, the Doctor decides to go undercover. The Skovox Blitzer is ready to destroy all humanity – and worse, any second now, Danny Pink and the Doctor are going to meet.
Clara Oswald is struggling to maintain two separate lives: one as the Doctor’s companion and the other as a school teacher at Coal Hill School, while also having a relationship with fellow teacher Danny Pink. Preparing for his next outing, the Doctor informs Clara that she cannot join him as he is going under “deep cover”. The next morning in the school staffroom, the head teacher presents a temporary caretaker: the Doctor, under the alias John Smith. Clara eventually learns the Doctor’s actual purpose is the presence of a murderous robot called the Skovox Blitzer located near the school, which contains enough firepower to destroy the planet. Clara tells the Doctor to leave it alone, but the Doctor explains that if he does not act, someone will attack it and it will begin to destroy Earth. He intends to draw it to the school at night when it is empty and use a time displacement vortex to displace it a billion years into the future where it can’t harm anyone. He is in the process of planting devices around the school to generate the vortex. He also demonstrates an invisibility watch, which he will use to avoid detection by the Skovox.
While at the school, the Doctor encounters Danny. Learning he is a former soldier, the Doctor assumes he is a PE teacher, claiming he cannot believe Danny is actually a Maths teacher. Soon afterwards, the Doctor assumes that Clara has an interest in another teacher, Adrian, due to his appearance being similar to that of his previous incarnation, the Eleventh Doctor. The Doctor tacitly approves of Clara’s relationship. Danny, however, becomes suspicious of the Doctor. One of Clara and Danny’s students, Courtney Woods, also becomes skeptical of him when she sees the TARDIS hidden inside his cupboard.
Working late, Danny discovers one of the Doctor’s time vortex devices. He inadvertently changes the settings by removing one of them. The Doctor lures the Skovox Blitzer to the school in the evening when it is deserted, but due to the settings change, is only able to displace the creature 73 hours forward. Danny is alarmed and dazed after learning of Clara’s double life; he initially assumes that she is an alien and the Doctor is her father. Explaining the truth to him, Clara allows Danny to observe her interactions with the Doctor, using the Doctor’s invisibility watch. The Doctor sees through this, and an argument arises between him and Danny out of mutual contempt before Clara blurts out that she loves Danny.
During Parents’ Evening at the school, the Skovox re-materialises earlier than the Doctor estimated. With Clara acting as a decoy, the Skovox is drawn to the Doctor. The Doctor stalls the Skovox by using a device to imitate its commander, but accidentally triggers a self-destruct protocol. Luckily, with Danny’s last minute intervention, they are able to order the Skovox Blitzer to stand down. Soon after, the Doctor sends the Skovox drifting into space, with Courtney as a passenger in the TARDIS; she gets sick, overwhelmed by what she sees. Later, during a heart-to-heart, Danny explains to Clara that he is impressed that the Doctor can push her to act without fear. But, he also tells Clara to let him know if the Doctor pushes her too far, so that he can help her. If she does not, then their relationship is through.
Meanwhile, a community support officer, vaporised by the Skovox a few days prior, awakens in the Promised Land. The interviewer (named “Seb” in the credits) informs the officer of his death and their whereabouts, and states that Missy is too busy to deal with him.