Jesus’ death on the cross merited for us the means to have our sins forgiven, the punishment for sin taken away, eternal life on high with God, and he opened heaven for us. Jesus instituted the seven sacraments by which the fruits of Christ’s redemptive death are applied to us. For example, Jesus said "No one can enter the kingdom of God without being born through water and the Spirit. " Baptism is one of the sacraments which Jesus wants us to partake in and by which the fruits and merits of his death and suffering on the cross are applied to us. In baptism, all our sins and the punishment due to our sins are all taken away so that if we died immediately after being baptized, we would go straight to heaven.
Again, Jesus said “unless you eat my flesh and drink my blood, you will have no life within you.” This refers to partaking in the eucharist and communion. So, Jesus’ death on the cross doesn’t automatically save us unless we do what he wants us to do such as partake in the sacraments of the Church and belong to His Church. Again, Jesus applies the merit and fruit of his death on the cross through the sacraments of the Church which give grace.
Confession is also one of the sacraments Jesus instituted for us. For we sin all the time and the sacrament of confession is a remedy for our sins. Here again, it is through this sacrament that Jesus applies the merit and fruit of his death of the cross. Our sins are forgiven in confession only because of Jesus’ redemptive and sacrificial death on the cross. We partake in Jesus’ death on the cross through the sacraments of the Church which Jesus instituted for us.
Now, there are three parts to the sacrament of penance, namely, contrition or sorrow for our sins, confession of our sins to the priest, and satisfaction or doing the penance the priest gives us to perform after we leave the confessional. The satisfaction or penance the priest gives us to perform, for example, saying an Our Father or a few Hail Mary’s, is to atone for the temporal punishment that is a consequence of our sins. For every sin carries with it either an eternal punishment which is the consequence of mortal sin, or temporal punishment which is the consequence of venial sin.
Indulgences atone for the temporal punishment of sins of which the guilt has already been forgiven such as we confess in confession. A plenary indulgence atones for all the temporal punishment we may accrue due to our sins while a partial indulgence atones for part of the temporal punishment due to our sins. Indulgences are a beautiful doctrine of the mercy of Jesus and God. We can gain a plenary indulgence by spending a half hour in prayer in front of the blessed sacrament and fulfilling the other prescribed conditions for plenary indulgences. Just by spending a half hour in prayer before the Blessed Sacrament, we can atone and satisfy for all the temporal punishment still lingering on our souls (we need to fulfill the other prescribed conditions for plenary indulgences too). Again, the Church’s granting of indulgences is the application of the fruit and merit of Christ’s death on the cross.
The Enchiridion of Indulgences, Norms and Grants is the official publication of the Catholic Church on indulgences. It can be found online here
basilica.org/pages/ebooks/Sacred%20Apostolic%20Penitentiary-The%20Enchiridion%20of%20Indulgences.pdf
You might especially want to read toward the back of this publication the Apostolic Constitution “The Doctrine of Indulgences” issued by Pope Paul VI in 1967 when the Church revised the practice of gaining indulgences. This Apostolic Constitution explains the doctrine of indulgences in the Church. You can also read about indulgences in the Catechism of the Catholic Church.