when you offer up your sins to god to be healed, after you have said the actions, and sins you have committed since your last confession so you must a prayer after admitting it to your pastor. The pastor allows you to speak with someone very close to our Lord. And if you are truly sorry then you will seek to change your life. The act of contrition even says at the end that from now on you will amend your life, and stop committing mortal sins that could actually lead to you not be allowed into heaven. Like squeezing a camel through the eye of a needle.