indulgences are “get out of jail cards” for purgatory (well, more or less). when a sin is forgiven in the confessional, the guilt is wiped away, but not the temporal punishment. divine mercy allows for the healing of the sin, but divine justice demands reparation be made (this is why you do a penance after confession). moreover, the church has access to the spiritual treasuries of heaven, and so grants some of those treasures in the form of an indulgence, meaning that when you fulfil the conditions of an indulgence, the church hands you that get out of jail card. the punishment you owed to sin has been payed off by the church’s treasury- therfore you owe no purgatory time to make reparation for the sins, and thus justice is satisfied. there is a book called the handbook of indulgences, and it explains how to get them.