It's a matter of applying the forgiveness won by Christ on the Cross to a particular person for particular sins.
It's not unlike being given a winning lottery ticket as a Christmas present. You didn't do anything to earn it. The ticket has already been purchased in the past. The drawing is in the past. You've already won. But you don't have the money until you go to the store and collect the winnings.
Similarly, Christ died for the forgiveness of your sins. You didn't do anything to earn it . Christ has already died (and is risen!) and has atoned for all sins, but you still have to go to the store and collect the mercy (i.e. have it applied to you).
If you don't repent and seek sacramental confession (the ordinary means of forgiveness established by Christ, see John 20:21-23) you are like a poor man with a winning lottery ticket in his sock drawer. The freely given gift does you no good if you won't unwrap it.
This is why, even though Christ's death is powerful enough to atone for all the sins of all the people who have ever and will ever live, not all those sins will be forgiven because not everyone is willing to accept forgiveness. Thus, even though God wills all to be saved (1 Tim 2:4) and even though Christ's death is powerful enough to effect the salvation of all, not all will, in fact, be saved. It takes action on both God's and our part to effect our salvation. As the Catechism of the Catholic Church (quoting St. Augustine) says, "God created us without us: but he did not will to save us without us." (1847)
|La Confessione by Giuseppe Molteni (1838)|