Jimmy Akin is just hands-down The Man when it comes to this topic. If you have time to read the whole thing, here is his lucid and lengthy explanation.
This, however, is the creamy filling:
"Purgatory is the name that Catholics give to the final purification which occurs at the end of life. Because we still sin in this life, but will not be sinning when we are in glory, between death and glorification must come purification. This is something even Protestants admit. Purgatory is thus the final rush of our sanctification. It is our transition into glory. All through the Christian life God is purifying our hearts, giving us greater holiness, but this sanctifying process is not complete (or anything like complete) until the end of life. Thus what God did not choose to give us in this life, he chooses to give us once we are dead.
"The only additional points on which the Catholic Church insists concerning the final purification are that, like sanctification in this life, it can involve pain or discomfort, and that, as when someone is being sanctified in this life, we can pray for someone being sanctified in purgatory. The Church does not teach that purgatory occurs in a special region of the afterlife or even that it takes place over time, for we have little idea how time works in the afterlife, and purgatory may be instantaneous from our point of view."
How sweet is that?!
9 hours ago