I’ll try to give the nutshell version.
Sin has consequences. Those consequences are both eternal (spiritual, everlasting) and temporal (earthly, non-eternal).
In the Sacrament of Confession, God wipes away the eternal consequences of sin. That’s the hard part. But the temporal consequences remain. Indulgences help “pay the price” for those temporal consequences.
The analogy I always use is the neighborhood kid hitting a baseball through the window. He goes to his neighbor and says “I’m sorry” and the neighbor says “I forgive you.” But the window is still broken. And it still needs to be fixed. The broken window is the temporal consequence and an indulgence is the act of fixing it (or paying down the debt we owe for the replacement).
We see this with our sin, too. Just because we step out of the Confessional does not mean that all the consequences of our sins immediately vanish. We still live with the consequences even though God has forgiven us.
Does that make sense?