The Catechism of the Catholic Church:
THE SACRAMENT OF PENANCE AND RECONCILIATION
1422 "Those who approach the sacrament of Penance obtain pardon from God's mercy for the offense committed against him, and are, at the same time, reconciled with the Church which they have wounded by their sins and which by charity, by example, and by prayer labors for their conversion."
WHAT IS THIS SACRAMENT CALLED?
1423 It is called the sacrament of conversion because it makes sacramentally present Jesus' call to conversion, the first step in returning to the Father from whom one has strayed by sin.
It is called the sacrament of Penance, since it consecrates the Christian sinner's personal and ecclesial steps of conversion, penance, and satisfaction.
1424 It is called the sacrament of confession, since the disclosure or confession of sins to a priest is an essential element of this sacrament. In a profound sense it is also a "confession" - acknowledgment and praise - of the holiness of God and of his mercy toward sinful man.
It is called the sacrament of forgiveness, since by the priest's sacramental absolution God grants the penitent "pardon and peace."
It is called the sacrament of Reconciliation, because it imparts to the sinner the live of God who reconciles: "Be reconciled to God." He who lives by God's merciful love is ready to respond to the Lord's call: "Go; first be reconciled to your brother.
1467 Given the delicacy and greatness of this ministry and the respect due to persons, the Church declares that every priest who hears confessions is bound under very severe penalties to keep absolute secrecy regarding the sins that his penitents have confessed to him. He can make no use of knowledge that confession gives him about penitents' lives. This secret, which admits of no exceptions, is called the "sacramental seal," because what the penitent has made known to the priest remains "sealed" by the sacrament.
BEFORE YOU GO TO CONFESSION:
Examine your conscience, that is, reflect on what sins you've committed. To guide you, just Google “examination of conscience” and you’ll find resources to help you. It’s even all right to make a list to bring with you if that helps.
When you come before the priest, begin by making the Sign of the Cross (praying the words out loud), and continue by saying, “Bless me, Father, I have sinned. It has been (how long) since my last confession. These are my sins...
List the sins you've committed that came to mind during your examination of conscience. Don’t be too general (“I haven’t been a good person”), but a lot of detail isn't necessary (you don’t need to tell the whole story of how a sin came about). If you’re not sure if something is a sin, ask the priest. This isn’t counseling, so unless you ask, the priest likely won’t give you advice. He’ll just move on to ...
The priest will suggest something for you to do or pray as a response to God’s mercy. You’ll have to remember what this is and do it after the confession is over, so pay attention.
ACT OF CONTRITION:
The priest will then ask you to pray out loud your “Act of Contrition,” to demonstrate your sorrow for your sins: "My God, I am sorry for my sins with all my heart. In choosing to do wrong and failing to do good, I have sinned against you whom I should love above all things. I firmly intend, with your help, to do penance, to sin no more, and to avoid whatever leads me to sin. Our Savior Jesus Christ suffered and died for us. In his name, my God, have mercy."
Don’t get up to leave after that prayer, because the best part is yet to come: The priest will extend his hands in your direction and he will pray the Prayer of Absolution: “God, the Father of Mercies, through the death and resurrection of his Son, has reconciled the world to himself and sent the Holy Spirit among us for the forgiveness of sins. Through the ministry of the Church, may God grant you pardon and peace. And I absolve you from your sins in the name of the Father, and of the Son, and of the Holy Spirit. Amen.” You respond: "Amen."
The priest will then likely say something like, “God has freed you from your sin. Go in Peace.” To which you can respond: “Thanks be to God.” Don’t forget to do your penance. If it is saying certain prayers, it’s best to do it right away in the church before you forget.