What is purgatory?
"All who die in God's grace and friendship, but still imperfectly purified, are indeed assured of their eternal salvation; but after death they undergo purification, so as to achieve the holiness necessary to enter the joy of heaven. The Church gives the name Purgatory to this final purification of the elect, which is entirely different from the punishment of the damned" (Catechism of the Catholic Church, 1030-1031). It is in purgatory that the last vestiges of love of self are transformed into love for God.
You borrow your friend's car. You're very careful, but realize on the way home that you're running late. In your haste to get the car back to your friend, you take a corner a little too quickly and sharply. Consequently, you crease the right front fender on a fire hydrant when you drive over the curb.
When you return the car to your friend, you point out the crease and say, "I'm sorry. Will you forgive me?" Like you, your friend is a good Catholic and says, "Sure, I forgive you. Now pay for my fender." Forgiveness does not equal forgetting.
This demonstrates the sense of justice God has given to us all. If we who are so imperfect must demand such simple justice, how can we expect that He should do less? Our sense of justice is a reflection of His. Does a judge tell a remorseful burglar about to be sentenced that society forgives him and it's okay to go home? Of course not; he sends the thief to the penitentiary—a place of penance. So purgatory is the perfect reflection of both His justice and mercy. Without purgatory to show His mercy, the slightest sin would by necessity condemn us all to hell.
Although purgatory is not explicitly mentioned by that name in the Bible, the concept of a place of purification is certainly there. Jesus said,
Christ mentions the sin for which "there is no forgiveness, either in this world or in the world to come" (Matthew 12:32). This implies that venial sins can be forgiven in the next world. Where? Hell is eternal punishment.
"I tell you, you will not get out till you have paid the very last penny" (Luke 12:59).
Even venial sin causes the soul to be unclean. The implication is clearly purgatory.
"Nothing unclean shall enter heaven" (Revelation 21:27).
"Paul tells us that at the day of judgment each man's work will be tried. This trial happens after death. What happens if a man's work fails the test? 'He will be the loser; and yet he himself will be saved, though only as men are saved by passing through fire' (I Corinthians 3:15). Now this loss, this penalty, cannot refer to consignment to hell, since no one is saved there; and heaven cannot be meant, since ther is no suffering ('fire') there. Purgatory alone explains this passage."1
The Church has always believed in purgatory. The Bible mentions the need to pray for the dead: "It is a holy and wholesome thought to pray for the dead, that they might be loosed from their sins" (II Maccabees 12:46). There are also the inscriptions of prayers for the dead in the catacombs, where Christians stayed largely hidden during the great Roman persecutions of the first three centuries. Finally, we have the writings of early Christians such as Tertullian (160-240), Cyprian (200-258), Cyril of Jerusalem (315-386), Ambrose (340-397), John Chrysostom (344-407), and Augustine (354-430) to tell us about purgatory and the need to pray for the dead.
1 Karl Keating, Catholicism and Fundamentalism, 193.