I’ll try to lay this out simply, even though it’s a complex issue.
There are three things we can note about sin and salvation. First, there is a distinction between salvation and redemption. Salvation is personal, and redemption is familial. That is, Christ redeemed mankind altogether, and Christ saves you individually. Second, there are two results of sin which correspond to the two needs of redemption and salvation. One is the incurrance of a debt (which separated us from God), and the second is the damage done to our nature (which leads to suffering and death). Third, purgatory deals with one of these results, namely the damage done to our natures.
Now let’s put this in terms that are more natural for us. Imagine you are married and you lie to your wife. It’s the first time you’ve done it and you feel terrible about it, but since you’ve done it once, it becomes easier to do it again. And so you continue lying to her, and then you start doing other things, like convincing yourself that she can’t handle the truth, that she’s weak, she needs the lie, she deserves it. Two things have happened. You cause a rift of distrust between the two of you, and you develop a habit of bad behaviour toward her.
Now imagine that you’ve come clean. You’ve recognized your problem, you’ve apologized for it, and you’ve made up for it as best you can. Have you fixed your habit of lying? Well, habits have that problem of persisting, and they take time to deal with. You often find yourself lying to her without even realizing it, and then find yourself regretting it afterward, and it’s a constant struggle.
Purgatory is the reordering of your relationship with God toward a proper relationship, wherein the bad habits no longer exist, you no longer offend God, etc. Christ’s sacrifice, and your baptism into it, is the redemption from sin. It is the restoration of humanity in God’s sight. It brings the relationship back into a state of unity. But your bad habits persist. So how do others help you?
Let’s go back to our analogy. You wife is helping you along with your bad habit. Every time you lie, she reminds you of it, and helps you to stop. She does preemptive things to help keep you from falling back into it. But your wife is fair. She gives you as much help as you ask for, or that you deserve. If you stop trying, her help lessens, because if you don’t want to try, she won’t force you. If you do try, she really helps.
Well, your relationship isn’t a vacuum. Your brothers and sisters, parents and relatives, friends and colleagues, they all saw the trouble you had in your relationship. Sometimes you confide in them. Sometimes, they encourage your wife to help you out more than you deserve. Sometimes they plead and beg, and sometimes they make grand gestures, like shovelling your driveway, or making a charitable donation in your name, all for your sake, so that your relationship is stronger, and you are happy.
Well, that’s what purgatory is. You’re getting rid of your bad habits to improve your relationship with Christ. Christ is the only one who can save you, and it is the fire of His love that burns away your vices. People who pray for you, or offer suffering for you, are doing so insupplication to Christ to increase the grace of His fiery love to burn away those vices more quickly, to hasten the recovery of your relationship with Him.