Purgatory
In the early days of Christianity, people pretty much thought that at the Last Judgment you went to Heaven if you had been good or you went to Hell if you had been bad and that was that. But later on people started to say, well, what if you had been mostly good except for one thing? Would you really have to stay in Hell forever just for that one thing? And beginning with Augustine, Christian writers began to form the idea of Purgatory, which was a bad place, like Hell.
You went there after the Last Judgment if you had done some bad things but you were mostly good. And you paid for the bad things, but then after a while you could still go on to Heaven. The idea of Purgatory was first clearly laid out by Gregory the Great around 580 AD.