The Myth of Er is a tale in Greek mythology about a man who died on a battlefield and returned to life nine days later, recounting what happened in the afterlife. The word "myth" was used in the ancient Greek sense, meaning account, rather than the present-day meaning.
Er was a man who died during a battle, and along with the souls of the other combatants, he was led to a magnificent place that had four doors; two into and out of the sky, and two into and out of the earth. There were judges who decided which path each soul should follow depending on the life they had led on Earth. The good ones were told to go to the sky, while the bad ones were led into the earth. From the sky exit, souls that appeared clean came out, telling of a place that filled them with incredible feelings. The souls that emerged from the earth exit were dirty and were talking about the misery and the difficulties they faced for punishment of what they had done while alive. Some souls however, those of murderers and other criminals, were not allowed to exit the earth and remained trapped forever.
Er was told that he would not be judged and that he should remain there in order to see the whole procedure and report it back to mankind. Seven days later, they were all led to another place where there was the Spindle of Necessity. Necessity or Ananke was a primordial goddess and personification of fate. There, the souls were given a lottery number, and based on that, each of them was told to ask what their next life should be. The first soul, having travelled through the sky in the previous area, decided to become a dictator; when that happened, though, he didn't realise that he was destined to eat his own children because of his actions. Er realised that the souls that had travelled through the sky and had not lived the punishment of the other path, often chose bad things for their next lives, while the opposite happened for the souls that had been punished.
Once the souls chose their next life, they were led under the throne of Necessity to the River Lethe (Forgetfulness), where they were told to drink in order to forget their previous lives. That night, when each soul fell asleep, they were sent to new bodies to lead their new lives. Er's soul did not go through all of this and did not drink from the River Lethe, thus remembering everything he had experienced. When he woke up, he returned to his old body which had not decomposed during that period, but he found himself on the funeral pyre that his fellow soldiers had started. They saved him from the flames and he managed to recount his experience in the afterlife.
The myth was used by Socrates to show that the choices people make have an impact on the afterlife, and that those who pretend to be pious but are false in their souls will be eventually punished in the next life.