Confession, in many religions, is the acknowledgment of one's wrong thoughts and actions (sins). This may occur directly to a god, to fellow people, or to a person acting as a mediator for a god.
It is often seen as a required action of repentance and a necessary precursor to penance and atonement. It often leads to reconciliation and forgiveness.
Christianity
Catholicism
In Catholic teaching, the Sacrament of Penance is the method of the Church by which individuals confess sins committed after baptism and have them absolved by God through the administration of a priest. The Catholic rite, obligatory at least once a year for serious sin, is usually conducted within a confessional box, booth or reconciliation room. This sacrament is known by many names, including penance, reconciliation and confession. While official Church publications usually refer to the sacrament as "Penance", "Reconciliation" or "Penance and Reconciliation", many clergy and laypeople continue to use the term "Confession" in reference to the Sacrament.
For the Catholic Church, the intent of this sacrament is to provide healing for the soul as well as to regain the grace of God, lost by sin. A perfect act of contrition, wherein the penitent expresses sorrow for having offended God and not out of fear of eternal punishment, even outside of confession removes the eternal punishment associated with mortal sin but a Catholic is obliged to confess their mortal sins at the earliest opportunity. In theological terms, the priest acts in persona Christi and receives from the Church the power of jurisdiction over the penitent. The Council of Trent (Session Fourteen, Chapter I) quoted John 20:22–23 as the primary Scriptural proof for the doctrine concerning this sacrament. Catholics also consider Matthew 18:18, describing the power to "bind" and to "loose", to be among the Scriptural bases for the sacrament.
The Catholic Church teaches that sacramental confession requires three "acts" on the part of the penitent: contrition (sorrow of the soul for the sins committed), disclosure of the sins (the 'confession'), and satisfaction (the 'penance', i.e. doing something to make amends for the sins). The basic form of confession has not changed for centuries, although at one time confessions were made publicly.
Typically, the penitent begins sacramental confession by saying, "Bless me Father, for I have sinned. It has been [time period] since my last confession." The penitent must then confess what they believe to be grave and mortal sins, in both kind and number, in order to be reconciled with God and the Church. The sinner may also confess venial sins; this is especially recommended if the penitent has no mortal sins to confess. According to the Catechism, "without being strictly necessary, confession of everyday faults (venial sins) is nevertheless strongly recommended by the Church. Indeed the regular confession of our venial sins helps us form our conscience, fight against evil tendencies, let ourselves be healed by Christ and progress in the life of the Spirit. By receiving more frequently through this sacrament the gift of the Father's Mercy, we are spurred to be merciful as He is merciful". "When Christ's faithful strive to confess all the sins that they can remember, they undoubtedly place all of them before the divine mercy for pardon."
The Catholic Church teaches, based on the Parable of the Prodigal Son, that confession is not a tribunal or criminal court, where one is condemned by God like a criminal, but a "wedding banquet hall, where the community celebrates Easter, Christ's victory over sin and death, in the joyful experience of his forgiving mercy." In confession, the church believes, God judges a person in the sense of bringing to light their sins, by granting the person the ability to confess their sins to the confessor, then grants the person repentance and, through the confessor, grants the person forgiveness. God's forgiveness restores the person to "the brightness of the white robe of baptism, a garment specifically required to participate in the [wedding] feast."