This is second part of a story that started in The Pandorica Opens. To recap, The Doctor is being held inside a large alien cube under Stonehenge after being put their by his enemies. Amy Pond has been killed by the Auton version of her fiance Rory. The universe has disappered except for the Earth, the moon and a solar explosion which turns out to be the Tardis.
Rory Williams is mourning the death of Amy when The Doctor appears and tells him he must go to the Pandorica and open the cube using the Sonic Screwdriver that he gives Rory. Rory obeys and takes the screwdriver, he goes down to the Pandorica and opens the prison. The Doctor is released from the prison. The Doctor tells Rory he must put dead Amy Pond into the Pandorica. The Doctor tells Rory that they need to leave but Rory demands to stay and look after his wife's body in the Pandorica. The Doctor doesn't argue and leaves.
In 1996, a young Amy Pond is given an instruction through the door that she must go to the National Museum and await further instructions. Amy manages to persuade her mother to take her to the National Museum. Once there, Amy visits the Pandorica exhibition to see another instruction to wait there until everyone else has gone. Amy disappears and hides from her mother.
Amy comes out of her hiding spot when everyone has gone. Amy goes to the Pandorica and touches it. The Pandorica opens and inside is the adult Amelia Pond alive and well. The young Amy touching the Pandorica has reactivated the dead version. The two Amelias are joined by the Doctor and Rory who has taken a job as a security guard to protect his wife's body. The Doctor uses River Song's wrist time machine to go back in time to give Rory the Sonic Screwdriver to open the Pandorica and travel to Amy's house to leave messages for Amy to go to the National Museum.
The reunion is interrupted by a Dalek made out of stone which forces the group to run. During their escape, they are met by a future Doctor who falls and dies. They leave the Doctor and continue the escape to the top of the building. On the roof, they see that the Sun or what they believe to be the Sun is getting larger. The Doctor tells them that the Sun is actually the Tardis going supernova.
The Doctor travels to the Tardis where he discovers that River Song is stuck in a time loop where he then rescues her and gets off the Tardis. Back on the Roof or the Museum, the Stone Dalek arrives on the roof and shoots the Doctor. Rory retaliates and shoots the Dalek thus destroying it. The injured Doctor travels back in time to the moment not too long ago when the others had found him injured.
The remaining members travel to where the dead Doctor is, only to find that the Doctor has disappeared. They rush to the Pandorica where the Doctor has strapped himself into. The Doctor plans to use the Pandorica in the Tardis to destroy both of them and if he's right then the timeline will be reset. The Doctor tells Amelia to focus on her family. The Doctor flies the Pandorica into the Tardis and the Universe is reborn.
Amelia wakes up in her own bed on the eve of her wedding with her mother about to give her a cup of tea to wake up to. Later at the wedding when its the speeches, Amy sees River Song walk past outside and is given a Tardis book which is blank. She announces that her invisible childhood friend is a real life one and she's calls for the Doctor to reveal himself. The others are a bit disappointed by what Amy has said but are forced to eat their words when the Tardis materialises on the dance floor.
When the Doctor announces he must leave, Amy still in her wedding dress announces that she has to leave and so does Rory. The Doctor engages the Tardis.