As an addendum, Purgatory is not a place where one goes to be forgiven of ones, sins. To enter Purgatory, one must have been forgiven of one’s sins in this life, through contrition, (sorrow for your sins), confession, (admitting that you have sinned) asking forgiveness of God, (as shown in an earlier post, the normal manner Jesus gave the Church is to authorize his Apostles, and priests to forgive sins in His name) or if no priest is able to hear ones confession, the Church does encourage a, “Perfect Act of Contrition” Asking God’s forgiveness without a priest to absolve you.
One who has been forgiven, but still has the punishment due for sin, enters into Purgatory to be purified, prior to entering heaven. The truth is that the Catholic Church has never officially defined in what manner Purgatory is worked on a soul, that much is speculation. That God cleanses the soul after the particular judgment, and prior to going to heaven, we know, how He does it we do not.