Neither of those. I understand it as a "cleansing fire" or a "purifying fire" of sorts, that is "rather painful than pleasant" and necessary "to achieve the holiness necessary to enter the joy of heaven".
Let's take a look at the current Catechism:
1030 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.
1031 The Church gives the name Purgatory to this final purification of the elect, which is entirely different from the punishment of the damned.606 The Church formulated her doctrine of faith on Purgatory especially at the Councils of Florence and Trent. The tradition of the Church, by reference to certain texts of Scripture, speaks of a cleansing fire:
As for certain lesser faults, we must believe that, before the Final Judgment, there is a purifying fire. He who is truth says that whoever utters blasphemy against the Holy Spirit will be pardoned neither in this age nor in the age to come. From this sentence we understand that certain offenses can be forgiven in this age, but certain others in the age to come.
And let's have a look at Hebrews 12:
7 It is for discipline that you have to endure. God is treating you as sons. For what son is there whom his father does not discipline? 8 If you are left without discipline, in which all have participated, then you are illegitimate children and not sons. 9 Besides this, we have had earthly fathers who disciplined us and we respected them. Shall we not much more be subject to the Father of spirits and live? 10 For they disciplined us for a short time as it seemed best to them, but he disciplines us for our good, that we may share his holiness. 11 For the moment all discipline seems painful rather than pleasant, but later it yields the peaceful fruit of righteousness to those who have been trained by it. (Hebrews 12)
Hebrews 12, although not referring to purgatory in particular, clearly establishes the concept that God trains his people by subjecting them to a painful discipline, for their own good so that they increase in righteousness and share in his holiness.
Now for some that training is completed during this life. For many others the training is completed after death, in what the Church refers to as purgatory.
Any other questions?