Hey, this concept was also beautifully illustrated in Doctor Who a few days ago. The episode hasn't aired yet in America, so if you are watching it on BBC America, you may want to avoid the spoilers, but otherwise read on:
So the Doctor's time-travelling companion is Amy Pond and she ran away with him on the night before her wedding. She goes on a few adventures, almost dies, and when he returns her back home, she reveals that the next morning is her wedding and overcome with lust she propositions him, while he realizes that the day of the wedding is the same day that the universe became cracked, with cracks extending forth from that date forward and backward in time, threatening to destroy the universe. In her last adventure, one of these cracks opened up and people who were consumed by it not only died but were never even born. The Doctor realizes that whatever is happening with the cracks is tied to Amy, and he crashes her boyfriend Rory's stag party in order to take him and Amy onto a date in 16th-century Venice. Eventually Rory becomes a travelling companion with Amy and the Doctor, and Amy realizes that she really wants Rory and loves him when she witnessed him die in a dream. But then in the next adventure, Rory dies for real when he is swallowed up in one of those cracks. Amy almost immediately forgets Rory and her own timeline is rewritten as if Rory had never been born. The Doctor however remembers because he time travelled prior to meeting Amy and Rory, and he still has the engagement ring.
Now in Saturday's episode, the Doctor travels to Roman-era Britain in AD 102, and discovers a mystery buried underneath Stonehenge. They are accompanied by Roman soldiers but while exploring the chamber, Amy is attacked by a Cyberman and a centurion kills it with his sword, saving her right as she falls unconscious. He then takes off his helmet and reveals that he is Rory. The Doctor then enters the room and doesn't notice that Rory is back after having died; he treats Rory as if it were the old team. It then dawns on him that Rory is back from the dead and asks him how he's been. Rory said he died and then he woke up and suddenly he was a Roman with lots of Roman thoughts, "it's very distracting". He remembers his old life, Amy, and what happened at the crack, and then suddenly he was alive again as a Roman. The Doctor doesn't understand this because Rory shouldn't be alive, he shouldn't even have been born. Then Amy wakes up and thanks the soldier for doing his sword thing and walks off, with no memory of who Rory is. Meanwhile another companion of the Doctor, River, is taken through time to Amy's house on the early morning hours of the day of Amy's wedding. River goes into Amy's bedroom and discovers that everything they were experiencing, the Romans, Stonehenge, was all from a children's book that Amy had in her bedroom, and that none of it was real. The Doctor meanwhile had given Rory the engagement ring and told him to go off to Amy and rekindle her memory. Rory tries to explain to Amy that he was her fiance but Amy doesn't remember although emotionally she is feeling something. River phones the Doctor telling him that it must be a trap, and then all the Roman soldiers receive a command that makes then move in unison, Rory included. The Doctor realizes that they are Auton androids, and they are dangerous (they conceal a gun inside their hands). Rory realizes to his disappointment that he is not really Rory, although he still feels all his love for Amy and has all his memories of his old life. He fights the urge to open up his concealed gun and tells Amy that he is a thing and begs her to run away as far as she can because he is going to kill her. But Amy suddenly remembers his last name, remembers that he is her boyfriend, and asks him to give her the engagement ring. Rory struggles but hands it to her and she fully remembers him and hugs him. Then Rory loses control, his hand opens up, and he involuntarily shoots and apparently kills her, and he holds her crying at the moment the universe becomes cracked.
The wiki article on the episode: http://en.wikipedia.org/wiki/The_Pandorica_Opens