“Purgatory (Lat., "purgare", to make clean, to purify) in accordance with Catholic teaching is a place or condition of temporal punishment for those who, departing this life in God's grace, are, not entirely free from venial faults, or have not fully paid the satisfaction due to their transgressions.”
“…The whole penitential system of the Church testifies that the voluntary assumption of penitential works has always been part of true repentance and the Council of Trent (Sess. XIV, can. xi) reminds the faithful that God does not always remit the whole punishment due to sin together with the guilt. God requires satisfaction, and will punish sin, and this doctrine involves as its necessary consequence a belief that the sinner failing to do penance in this life may be punished in another world, and so not be cast off eternally from God."
At least some Catholic theologians admit that this doctrine has little basis in Scripture:
“There is not much in Scripture on Purgatory except that in Second Maccabees 12:45, Judas sends a collection to the Temple for those fallen in battle, found with amulets on, "that they might be freed from this sin." Luther saw so clearly that this referred to Purgatory--which he rejected--that he rejected this book too, declaring it not part of Scripture. Some have tried to see an implication of Purgatory in Matthew 12:32. There Jesus speaks of the sin against the Holy Spirit that will be forgiven "neither in this world nor in the next." But the expression quoted is known in Rabbinic literature, where it means merely "never." Still less could we deduce purgatory from First Corinthians 3:11-15. Paul means if the work of some Christian worker has been of such low quality that it burns down, he himself will be saved "as through fire." But the fire seems to mean the apocalyptic fire of the last day, not a fire of purgatory.
But our belief in Purgatory rests on the tradition and definitions of the Church, at the Councils of Lyons II, Florence, and Trent.”
-The Basic Catholic Catechism
What Christ could not do alone, the Church faithful can. Through prayers and indulgences, the faithful on earth can relieve some of the punishment for those in Purgatory.
“Hence, since our prayers and our sacrifices can help those who are still waiting in purgatory, the saints have not hesitated to warn us that we have a real duty toward those who are still in purgatorial expiation.” Catholic Encyclopedia
”In the communion of saints, "a perennial link of charity exists between the faithful who have already reached their heavenly home, those who are expiating their sins in purgatory and those who are still pilgrims on earth. between them there is, too, an abundant exchange of all good things." In this wonderful exchange, the holiness of one profits others, well beyond the harm that the sin of one could cause others. Thus recourse to the communion of saints lets the contrite sinner be more promptly and efficaciously purified of the punishments for sin.” CCC 475
“An indulgence is obtained through the Church who, by virtue of the power of binding and loosing granted her by Christ Jesus, intervenes in favor of individual Christians and opens for them the treasury of the merits of Christ and the saints to obtain from the Father of mercies the remission of the temporal punishments due for their sins. Thus the Church does not want simply to come to the aid of these Christians, but also to spur them to works of devotion, penance, and charity. Since the faithful departed now being purified are also members of the same communion of saints, one way we can help them is to obtain indulgences for them, so that the temporal punishments due for their sins may be remitted” CCC 478-479