In July, the Ponds go about their normal everyday lives. When Rory points out that they have two lives, one with the Doctor and one without, Amy wonders what they should do and Rory says they have to choose. Before they can discuss it further, the TARDIS materializes in their back yard and they figure they can choose later.
Later, Amy and Rory are asleep when a small black cube appears in their bedroom and drifts onto a night stand.
The next day, Brian Williams comes to the house... which is surrounded by hundreds of the black cubes. He hits the doorbell until Rory and Amy wake up and then points out all of the cubes. Nobody knows what they are or where they have come from. Amy spots the Doctor nearby in the playground, examining a cube.
The cubes have appeared around the world and no answers are forthcoming. In the TARDIS, the Doctor continues his analysis and informs Rory, Amy, and Brian that the cubes are absolutely identical down to the molecular level. Amy wonders if it's an invasion and the Doctor admits that he doesn't know. He goes to the Ponds' kitchen and starts using it to conduct experiments. Rory says that he has to go work, much to the Doctor's surprise, and Amy explains that they both have jobs.
Soldiers move in on a hostile signal and surround the Pond house. Meanwhile, the Doctor conducts his experiments and Amy says that they think ten years have passed in their timeline while they've been on their travels with him. The soldiers burst in and secure the house. Their leader comes in and apologizes for the ruckus, explaining that there was a spike in Artron energy that they had to check out. She introduces herself as Kate Stewart, head of Scientific Research at UNIT. After taking in the Doctor's clothing, she scans him and confirms that he's a Time Lord. Kate explains that Science now runs the military and admits that they've found nothing by testing the cubes other than that they seem to be invulnerable. She believes that it's a hostile action but admits that it would be impossible to coordinate a worldwide effort to lock them up. They need evidence and the Doctor says that they need to monitor them day and night.
After four days, nothing happens. The Doctor is soon bored and they tell him to go be busy while they watch the cubes. He does everything around the house... in an hour. The Doctor goes back into the TARDIS where Brian is still watching the cubes, and tells everyone that he's going on a quick jaunt for his own sanity. The Ponds refuse to go with him, saying they have jobs, and the Doctor takes off without them.
Three months later, nothing has happened. Amy is out with her friend Laura, who points out that she isn't sure if she can have Amy as a bridesmaid given how she disappears occasionally. At the hospital, Rory's friend Ranjit tells him the same thing, that there are times when he vanishes for months at a time. Ranjit asks Rory to go full-time. Back at home, Rory tells Amy that he agreed, and Amy says that she committed to being a bridesmaid, months in advance. They both wonder if real life got started and they admit that they like it.
Brian records his video log on the 67th day of the invasion and reports that the cube he's been watching did nothing. Rory is less than impressed but Brian insists that he's doing what the Doctor asked.
Two months later in December, Rory is working the Christmas holiday at the hospital. He's unaware that a young girl in the waiting room is sitting with a cube, and both her eyes and the cube briefly glow blue. Two masked orderlies check on a patient, but ignore him. When he rips off their masks, he discovers that they have cubes in their mouths. The girl comes in as watches as the man screams and the orderlies take him away.
Across the globe, the cubes become an accepted part of everyday life.
Six months later in June, Amy and Rory are celebrating their wedding anniversary with a party. Amy leaves a message for the Doctor informing him that UNIT has declared the cubes provisionally safe and they're not doing anything. The Doctor arrives in mid-message with flowers and takes Amy and Rory with him to June 6, 1890 for an anniversary stay at the recently-opened Savoy Hotel. He assures them that he'll have them back before anybody notice and leaves them alone for their anniversary. However, the Doctor soon discovers that half of hotel staff are Zygon imposters. He fixes everything and takes them to the wedding of Henry VIII. When Amy speaks up at the wrong moment, they're forced to hide in the King's bedroom but the Doctor gives them away.
The Doctor eventually gets the Ponds back for their anniversary. Only Brian notices that they're wearing different clothes and asks the Doctor how long they were gone. The Doctor admits they were gone for seven weeks and Brian asks what happened to his other companions. He tells Brian that some left him, some were left behind, and a few died. However, the Doctor insists that Amy and Rory will never die with him. After the party, the Doctor asks Amy if he can stay with them. He assures her it won't drive him mad this time and admits that he misses her.
A month later, Brian continues to record his log but the cube does nothing and he dozes off. Meanwhile, Amy, the Doctor, and Rory watch TV and enjoy fish fingers and custard.
Brian's cube moves, jerking him awake. He realizes something is wrong and checks his video recordings. Meanwhile, the cube in the kitchen opens for a split second and then closes. When Amy goes to the bedroom, she sees a cube glow and tries to pick it up, but it exudes a small square of needles, pricking her hand. A heartbeat pattern then appears on the surface of the cube.
Rory's cube in the kitchen opens again. When he tries to see what's inside, it closes but a panel on the other side opens and closes.
The Doctor is playing the Wii when the cube in the room floats in front of him. He warns it that he will defend the planet but gets no response at first. A blaster then emerges from the side and the cube fires at him. The Doctor ducks for cover and the cube starts surfing the Internet via the Ponds' computer. Rory, Amy, and Brian arrive to warn him, and Ranjit calls to tell Rory that people are reporting attacks by the cubes. The young girl with the cube is still in the waiting room, watching.
Rory takes off for the hospital and Brian insists on going with him to help out. Kate summons the Doctor to her headquarters at the Tower of London via a message on his psychic paper. When he and Amy get there, Kate tells them that all of the cubes activates across the world at the same moment. UNIT is currently monitoring 50 cubes and each one is doing something different. Some are creating mood swings, some are emitting music. Some of them are hacking computer systems, including top-secret government databases. Kate admits that she's not sure what to do next, and the Doctor tells her that her father, Brigadier Lethbridge-Stewart, would be proud of her.
All of the cubes suddenly deactivate after 47 minutes. The Doctor goes out to get some air and Amy goes with him. He asks if she's considering giving up her travels with them and Amy admits that since he gave them a house, they've gotten used to a normal life and traveling feels like running away. The Doctor insists that he's running to things, not away from them, because everything grows and fades so quickly. When Amy asks why he keeps coming back for them, the Doctor explains that it's because they're the first faces that he saw and he keeps coming back before he forgets them.
The Doctor suddenly realizes that the cubes got what they wanted and goes to tell Kate that the cubes gathered all the information on Earth and its residents, including their medical and military limitations. The power goes out despite the backup generators and they discover that all of the cubes are showing a blue 7 on them. All of the numbers suddenly change to 6s and the Doctor figures that it's a countdown. He tells Kate to get the news out that everyone on Earth has to get away from the cubes as quickly as they can. When Amy wonders why they waited a year to activate, the Doctor speculates that whoever sent them wanted them to be accepted and taken into every house, business, and government on Earth. He then starts monitoring for traces activation signals.
As the news goes out, the cubes count down to 5 and then 4. Rory has the staff get rid of the cubes in the hospital while Brian goes to get some supplies for his son. The two masked orderlies go by, pushing a gurney, and he asks them for the supplies cupboard. They turn and advance on him.
A minute later, Rory notices that Brian hasn't returned. He goes out in the hallway and sees the two orderlies taking Brian away on a gurney. They run and Rory chases after them until they take the elevator. Rory manages to open the door but there's no sign of them. As the doors close, Rory touches the wall and sees it waver. He steps through and finds himself on an alien spaceship in orbit above Earth.
As the countdown reaches two minutes, the Doctor decides to go into one of the isolation chambers and confront a cube directly. Nothing happens and another minute goes by. The countdown reaches zero and the cubes all go dead. The Doctor's cube opens but he discovers that there's nothing inside. He storms out, insisting it doesn't make sense, and confirms that nothing has emerged from any of the millions of cubes. However, the CCTV monitors show people suddenly collapsing, clutching at their chests. As the Doctor tries to work it out, he clutches at his chest in sudden pain. He tells Kate and Amy that one of his hearts has stopped. The Doctor checks the scans and confirms that each box is targeting the nearest human heart, which runs on electrical impulses. The scan he set up earlier to find the source of the transmission signals turns up positive, showing seven stations scattered across the world. A wormhole emanates from the central transmitter is located at Rory's hospital.
On the spaceship, Rory finds Brian in a room with several comatose hospital patients on slabs. As he goes to his father, the two altered orderlies advance on him with syringes.
The Doctor, Amy, and Kate accompany a squad of soldiers to the hospital while reports come in that almost a third of the world's population has been targeted. While Kate goes to coordinate the world effort against the cubes, the Doctor scans for the wormhole portal and spots signals coming from the girl. Her face glows with circuitry patterns and the Doctor realizes that she's a droid monitoring the situation. He shuts her down with his sonic screwdriver but then collapses from the continuing heart failure. Amy uses a portable heart resuscitator to bring him back and the Doctor revives, kisses Amy on the forehead, and runs off.
After checking the energy signals, the Doctor and Amy locate the wormhole in the elevator. They step through together and find Rory, now on a slab with the other captives. As they revive him, the alien commander, one of the Shakri, opens fire on them. As Rory and Amy get Brian out, the Doctor turns to the Shakri, who dismisses humanity as a plague overwhelming Earth. The Doctor is surprised that the Shakri existed, having believed them a myth. It says that it serves the Word of the Tali and plans to eradicate humanity before it colonizes space.
Rory and Amy come back and the Doctor explains that the Tali is another term for Judgment Day. The Doctor tells the Shakri that humanity took in the cubes because they have hope and sought something better, and tells the alien to measure humanity's failing against their successes. The Shakri insists that the Tali must be met and prepares to release a second wave of cubes to finish the extermination.
On Earth, Kate tells her government that they must band together or die.
The Shakri dismisses humanity as a race forever fighting among themselves and tells the Doctor that the Tali will be met. He disappears and the Doctor explains that the alien was simply a projected image from the ship. He goes to the main console and tries to work out a way to use the cubes to resuscitate everyone who was stricken in the first attack. The Doctor succeeds but realizes that the backlash will strike the ship and tells Rory and Amy to run. They get back to Earth through the wormhole just in time as the ship explodes.
Across the planet, the cubes' victims revive.
Later, the Doctor meets with Kate, who admits that he's just as remarkable as her father said. She gives him a thank-you kiss and the Doctor leaves for a dinner date.
At the Ponds' home, the Doctor has a meal with Rory, Amy, and Brian. He starts to go and then tells Amy and Rory that he understands that they have normal lives that they don't want to give up. Brian points out that it's the Doctor they don't want to give up and he doesn't think they should. He tells his son and daughter-in-law to go with the Doctor and save every world they can find. The Doctor invites him along but Brian says that someone has to take care of things.