This is by no means a complete explanation, but I though it might be worth posting.
Purgatory doesn't eliminate Hell, and it's really more of a state than a place (although you'll see terminology for both state and locale in many descriptions). The Church has always taught that there are temporal effects of sin (consequences) that persist after our sins have been forgiven by Christ. (You can see references to this in the early Church Fathers Tertullian, St. Cyril of Jerusalem, Origen, St. Gregory of Nyssa, St. Cyprian and others). Some of these effects or consequences are readily visible (immediate physical, economic, or social consequences) and some are spiritual and psychological (for example, our disposition toward a certain sin or a lingering anger or resentment). Another way to look at these effects is as attachments to worldly things—essentially, something or someone to which we cling that hinders our ability to give ourselves fully to God. In any case, these attachments and effects have to be removed before we are perfected and can stand in God's presence (since nothing imperfect can stand in God's presence). Sometimes we deal with them in life, and sometimes after.
However, if we get to Purgatory, there's no question of where we're bound. Purgatory is like the mudroom of Heaven—it's where we get cleaned up after our long trip. The word itself comes from the word "purgare," which means (to make clean or purify). And that's pretty much what happens.... we're made clean of any impediments or residual effects of sin prior to entering the beatific vision (that is, God's direct presence). Some people finish this work before they die and don't go to Purgatory. Many of us still require a bit of freshening up. I mean, who doesn't want a shower after a long trip before going to greet your family?
I mentioned last night in a discussion on this topic that Purgatory is yet another sign of God's mercy. None of us are truly perfect, and we only even approach perfection through God's grace. If perfection were required for salvation, I dare say not many Christians (if any of us) would make the cut. God knows this and gives us every opportunity to come to Him.
Scripturally, there are allusions to a time in which people aren't quite in their final destination or are at least in need of assistance. Matthew 12:32 mentions people who blaspheme against the Holy Spirit not being forgiven in this world or the next, which suggests that in some cases, some sins required satisfaction in the next world (while others, those blasphemies against the Holy Spirit, would not be forgiven even then). St. Isidore of Seville, St. Augustine, St. Gregory the Great, and St. Bede all interpreted this passage to point to a time of final satisfaction for some sins or their effects. St. Paul mentions in 1 Corinthians 3:14-15 that some people's works may earn them a greater reward, while others may be purged: "If the work which any man has built on the foundation survives, he will receive a reward. If any man's work is burned up, he will suffer loss, though he himself will be saved, but only as through fire."
And then we have the question about prayers for the dead, which is a practice going back to the Jews of the Maccabean period. One of the books of the Septuagint* (2 Maccabees 13) tells the story of Judas Maccabee ordering prayers for the dead. Jewish Tradition also has the mourner's kaddish, which is a prayer Jews offer for the dead for set periods of time following death. Tradition has always interpreted this to mean that the dead are in need of our prayers to assist them on their final journey, which is also one of the reasons Catholics and Orthodox perform penance for themselves and for everyone else. Penance serves as satisfaction for the temporal consequences of sin. We cannot ever repay what Jesus has done for us in forgiving our sins, but we can attempt temporal reparation and healing where the effects of sin persist. This is how we join ourselves to His saving work. But this doesn't mean we're adding to His work, since any good we do comes from Him anyway.
She followed up with a reflection on what she has been taught about justification and asked when Catholics believe the unrepentant go to Hell. I talked a little first about the Catholic notion of justification, then explained what happens to those who are unrepentant.
[T]his is where the debate about justification, sanctification, and salvation took place during the Reformation. However, Luther's take on it was a bit different from yours. He believed that we are so depraved that we could be justified in purely an extrinsic sense--that is, we are never actually cleansed, but Christ "covers up" our sins so God doesn't look at them. The Catholic Church teaches that those sins are actually wiped away and that we, through the process of sanctification, are perfected and made holy. So justification imputes grace, which frees us from sin and changes the soul (over time) to conform more completely to Christ.
However, as with physical injuries, there is often still a wound that has to heal or defects that need to be repaired. Another way to look at it is how a good parent deals with children. If Seth broke somebody's window playing baseball, then apologized to you, you would naturally forgive him. However, you'd also require him to replace the window, would you not? That's reparation—simple justice. God doesn't require from us the penalty due to sin, but we do sometimes have to repair the damage we do to the Body of Christ, the Church. (By the way, we believe that all sin is both personal--damaging to self--and corporate--damaging to the Church.)
You will find that scripture can be read [note: this should have said "interpreted"] in ways to support all three positions, which is why Catholics are supposed to rely as well on Sacred Tradition (what has been passed down through Apostolic succession from the earliest days of the Church) and the teaching office of the Church (magisterial authority). Without these, you get many interpretations and new denominations with each. Christ left us a Church, the Pillar and Bulwark of the Truth as Paul said (1 Timothy 3:14-16), to be our guide.
Souls of those who are finally unrepentant (which is what we call "blasphemy against the Holy Spirit") go to Hell at death. Some theologians debate about whether there is a final choice that each of use makes at that point, but even if there's a "final" choice, it would be based upon the personal decisions and actions of the individual and whether they embraced God's forgiveness prior to death. Christ is our final judge, and He confirms the decision we've already made through our lives and our acceptance or nonacceptance of His gift. The Church also teaches that there's a personal judgment (meaning one that takes place immediately upon death) and a final judgment (which takes place at the end of time). It's at this final judgment where we come to understand the fullness of His plan. I think it will make His mysterious plan make sense to us, whereas now we can see only through a glass darkly (1 Cor. 13).
*A Greek translation of Jewish scripture from around 3rd century BC. Several of these books were rejected by Luther and the Reformers but were in constant use by Christians and standard scripture of the Jewish Diaspora prior to the end of the first century AD. The New Testament actually quotes from the Septuagint translation. The books of Maccabees were where the Hanukkah tradition originates.