Continuing from the end of "The End of Time, Part 2", the newly regenerated Doctor (Matt Smith) crash-lands his damaged TARDIS in Leadworth, in 1996. He meets seven-year-old Amelia Pond (Caitlin Blackwood), who shows him a scary crack in her bedroom wall. The Doctor discovers it is a crack in time and space itself, briefly opening it to discover an Atraxi prison. The Atraxi send a psychic message to the Doctor that "Prisoner Zero has escaped". Then the TARDIS's cloister bell is heard; the Doctor races back to his machine, promising Amelia that he will be back in five minutes.
The Doctor returns, unaware that he is 12 years late. On searching the house, he is knocked out and wakes up handcuffed. He discovers his assailant is a much older Amelia, now going by the name Amy (Karen Gillan). Amy, having believed in the Doctor's return and created toys and stories about him, has been ridiculed by others in the village. She finds the Doctor's damaged sonic screwdriver, and, dodging Prisoner Zero, they flee the house.
Shortly afterwards, the Atraxi arrive in orbit, alerted by the Doctor's arrival, and issue an ultimatum: if Prisoner Zero is not found, the Earth will be destroyed. Meeting Amy's boyfriend Rory (Arthur Darvill), the Doctor realises that Prisoner Zero, a multiform that can take the form of any unconscious being it has come in contact with, is borrowing the forms of a nearby hospital's coma patients. The Doctor uses a laptop to gatecrash an online meeting of scientific experts and relay specific instructions to them.
The Doctor races to the hospital, and arrives in time to save Amy and Rory from Prisoner Zero. The Doctor reveals his plan: he has created a computer virus that will broadcast the number "zero" across the world. It is tied to Rory's phone, which contains images of the coma patients, identifying Prisoner Zero in whatever form it may take. Prisoner Zero reveals it has one more form that is not on Rory's phone. Prisoner Zero knocks out Amy and transforms into the Doctor and young Amelia, whom it was able to bond with during the Doctor's absence. The Doctor realises that Amy can hear him speaking and manipulates her subconscious to remember the form of Prisoner Zero she saw in the house, which forces Prisoner Zero to reveal its true form; it is identified by the Atraxi and transported away. Prisoner Zero again warns the Doctor that "Silence, Doctor... silence will fall." The Atraxi fleet leaves the Earth but the Doctor orders their return, upon which he reprimands them for their actions. The Doctor shows the Atraxi that past invaders had come but no sign of their presence remained, alluding to their annilhilation at his hands.
As the Atraxi flee, the Doctor finds the TARDIS, and departs before Amy or Rory can catch up. The Doctor returns to Amy's house, finding that another two years have passed. Though Amy is still upset with the Doctor, she readily accepts his offer to travel with him, as long as he can return her the next day. In response to why he chose her, he promises that the reason is because he is lonely, although it is shown that he is analyzing the crack from the bedroom and possibly wants to monitor Amy. As the TARDIS dematerialises, the viewer is shown Amy's bedroom, where, alongside her toys and drawings of the "raggedy Doctor," is her wedding dress.