From someone who tried the Catholic way for ten years, here goes:
The doctrine of Purgatory is tied up with Catholic theology on sin, confession, and reparation.
First, there's the distinction between venial and mortal sin. Venial sin is your everyday, garden-variety sin that's not about anything serious, or is done out of weakness or passion (say, giving another driver the ol' one-finger salute when you're cut off). No real worries, mate: prayer, good works, almsgiving and participation in Mass cleans those light sins right off. You're encourged,
strongly, but not
required, to confess venial sins.
Mortal sin is the big one, though. For a sin to be mortal, three conditions must be fulfilled: a) the sin must involve a "grave matter" (e.g. the Ten Commandments, or anything considered a felony in your culture, OR something that you CONSIDER to be a grave matter, even if it isn't objectively); b) there must be "sufficient reflection" (that is, you think back and forth about whether you're going to do it, or not, and why, and what ramifications there might be); and c) there must be "full consent of the will" (that is, "I know that this is seriously wrong, and will kill the life of grace in my soul, but I'm going to do it anyway, because I want to").
Once you've gone
that far, you've committed "moral suicide" and your soul is dead. You're de facto excommunicated and cannot receive the Eucharist. You're on yer way to hell in a handbasket. So what do you do? You whip up as much sincere contrition as you can muster and get yourself to Confession (or Reconciliation, for post-Vatican II types). You confess your sin to the priest; he makes the judicial decision as to whether you're truly contrite; and if so, he pronounces absolution - your sin is forgiven, and the eternal punishment due to it (hell) is remitted.
HOWEVER, there is still the matter of
temporal punishment. The traditional parable to explain it goes like this: Johnny is playing baseball and breaks Mr. Smith's window. Johnny is sorry and goes to Mr. Smith and confesses to breaking the window. Mr. Smith says, "Thank you, Johnny; you're a fine young man; I believe you're truly sorry, and we're still friends. Now, about that broken window - how much allowance do you get each week...?"
God in his mercy remits the eternal punishment due to confessed and forgiven mortal sin, but you still have the responsibility (and privelege) of doing something to make reparation to God for the dishonor shown him. You still have to pay for the broken window. Usually in modern Catholicism, this amounts to a certain number of prayers the priest will have you say ("five 'Our Fathers', five 'Hail Marys', and five 'Glory Be...s'").
In the early church, penance was much more rigorous, and could involve many years of prayer and fasting before one could be readmitted to the Eucharist. That's where indulgences come in; saying the prayers and or doing the works required for a "three years indulgence" doesn't mean that you get three years knocked off your time in Purgatory; it means that the spiritual value of three years of hard penance in the early church are added to your spiritual "account".
SO...(whew!), you've confessed your mortal sin, been forgiven, and received your penance. But let's say you decide NOT to say your penance right there in the church after Confession, because you're late for a party, so you'll do it tomorrow, and you run out of the church and a piano falls on you...why not?

Here's the problem: you
won't go to hell, because your eternal punishment was remitted in Confession - but you
can't go straight to Heaven, either, because you haven't satisfied your debt of temporal punishment.
Hence Purgatory. It
hurts like hell, but it doesn't last forever. Your few prayers of penance, said in
this life for the love of God and his honor, would have adequately cleansed you, but since you didn't "pay" in this life, you've got to suffer a gazillion times more punishment in Purgatory to be ready for Heaven. (Additionally, suffering in Purgatory will only purify what love of God you may already have; suffering in this life also helps to grow your love for God). Those in Purgatory know that they are suffering for the love of God; therefore, they are, in a sense, happy that they are making reparation to God's honor and are destined for Heaven.
To sum up: in Catholic thinking, Jesus saves from
hell; the rest is prety much up to you, either here or in Purgatory.

