Everybody sort of knows about Dante, and the account he wrote c. 1300 of a trip through hell, purgatory, and heaven (or, in his Italian, inferno, purgatorio, paradiso). There's even a "Dante's Inferno" video game. But Dante was not the first, even if now the best known. Visions of heaven and hell had been found in Christian writings since the early Middle Ages, often composed as a warning of the punishments to come if one did not stop sinning.
But how about purgatory, you ask? Well, purgatory was late to the game, really becoming established only in the twelfth century.
Theologically heaven and hell were well established from late antiquity on. From the time of Adam and Eve on, in medieval theology, everybody went to hell. Adam and Eve had started sinning (disobeying God) almost as soon as they were created, and everybody after them had had original sin, that is sin from their origin. No one, no matter how virtuous or well meaning, could be saved. Hell was Satan's realm. He thought this was a great arrangement.
That was why, according to Christianity, humans needed salvation, which came in the form of Jesus, who was both fully human (so that he could atone for all of humanity's sins) and fully divine, omnipotent enough to make up for millennia of sinning. The whole point of salvation was that it was undeserved--humans couldn't deserve it (because they were sinners), but they could accept it, by trying to be the best people they could.
Heaven only started being populated after the crucifixion. During the three days Jesus was dead (Good Friday to First Easter), he was supposed to have "harrowed" Hell, gone through and scooped up all the virtuous Old Testament figures. So the first people to arrive in a Christian heaven were Jews.
Except for these Old Testament figures, everyone else was in hell for good. Purgatory was different, because you didn't have to stay there forever. There had long been a sense that there ought to be some sort of halfway house, for those not evil enough to deserve eternal punishment yet not pure enough to go straight to heaven and eternal bliss. By the twelfth century, this took formal shape as purgatory.
One was punished in purgatory to "purge" one's sins (hence the name), but after a certain amount of time you had been punished enough and got to go to heaven.
Exactly when you went to heaven or hell was a bit unclear. Officially on Judgment Day the dead would rise from their coffins and be judged, sent off to where they deserved to be. But there was also a sense that you were sent there immediately. After all, the saints were already in heaven. Otherwise they couldn't intercede for you with God. And there were plenty of visions of sinners already roasting in hell.
Hell has always been more interesting than heaven. It would be lovely to enjoy eternal bliss, but it's boring to read about. Dante's Inferno gets far more attention than his later two books.
I myself have used pre-Dante medieval visions of Hell in "Is This Apocalypse Necessary?" where my heroes actually voyage through hell (it's a fantasy), but I never try to get them into heaven. (Click here for more on this book.)