The Sacrament of Reconciliation was instituted by the risen Jesus in John 20:22–23. Jesus breathes upon the apostles and says, “Receive the Holy Spirit. If you forgive the sins of any, they are forgiven them; if you retain the sins of any, they are retained.” In so doing, He delegated the power to the Church's hierarchy, at this point the eleven apostles, to act in His person to forgiven sins and reconcile Christians to God and to the Church.
The sacrament has taken different forms over the centuries, but it has always been practiced by the Catholic Church. At first, the sacrament may have been associated with the penitential rite of the Mass for all but the gravest sins. Those required a public confession and public penance (for quite a long period of time) before the penitent was allowed back into full communion with the Church. Private confession was likely also practiced early on and became more widespread in the Middle Ages as Irish monks continued to regularize the form.
Today the sacrament involves the elements of contrition, confession, absolution, and satisfaction (penance). Contrition involves being truly sorry for one's sins, and it is a requirement for a valid reception of the sacrament. All mortal sins (deliberate, grave sins that break a person's relationship with God) must be confessed, but venial sins may and should be confessed as well in order to receive the grace of the sacrament. These confessed sins are the matter of the sacrament. The form of the sacrament consists of the words of absolution spoken by the priest in persona Christi, the person of Christ, by which God, through His instrument the priest, forgives the penitent's sins and reconciles the penitent to Himself and to the Church. The priest also prescribes a penance that helps the penitent make satisfaction for their sins, that is, to repair the damage done by sin. The penance may be prayers, works of mercy, service, and/or sacrifices.