You might want to read the Catechism of the Catholic Church, here’s a good on line site:scborromeo.org/ccc/p2s2c2a4.htm#1471
[quote=www.scborromeo.org] X. INDULGENCES
1471 The doctrine and practice of indulgences in the Church are closely linked to the effects of the sacrament of Penance.
What is an indulgence?
"An indulgence is a remission before God of the temporal punishment due to sins whose guilt has already been forgiven, which the faithful Christian who is duly disposed gains under certain prescribed conditions through the action of the Church which, as the minister of redemption, dispenses and applies with authority the treasury of the satisfactions of Christ and the saints."81
"An indulgence is partial or plenary according as it removes either part or all of the temporal punishment due to sin."82 The faithful can gain indulgences for themselves or apply them to the dead.83
The punishments of sin
1472 To understand this doctrine and practice of the Church, it is necessary to understand that sin has a double consequence. Grave sin deprives us of communion with God and therefore makes us incapable of eternal life, the privation of which is called the “eternal punishment” of sin. On the other hand every sin, even venial, entails an unhealthy attachment to creatures, which must be purified either here on earth, or after death in the state called Purgatory. This purification frees one from what is called the “temporal punishment” of sin. These two punishments must not be conceived of as a kind of vengeance inflicted by God from without, but as following from the very nature of sin. A conversion which proceeds from a fervent charity can attain the complete purification of the sinner in such a way that no punishment would remain.84
1473 The forgiveness of sin and restoration of communion with God entail the remission of the eternal punishment of sin, but temporal punishment of sin remains. While patiently bearing sufferings and trials of all kinds and, when the day comes, serenely facing death, the Christian must strive to accept this temporal punishment of sin as a grace. He should strive by works of mercy and charity, as well as by prayer and the various practices of penance, to put off completely the “old man” and to put on the "new man."85