From the Council of Trent
CANON VI.-If any one denieth, either that sacramental confession was instituted, or is necessary to salvation, of divine right; or saith, that the manner of confessing secretly to a priest alone, which the Church hath ever observed from the beginning, and doth observe, is alien from the institution and command of Christ, and is a human invention; let him be anathema.
From the Catechism of the Catholic Church
1447 Over the centuries the concrete form in which the Church has exercised this power received from the Lord has varied considerably. During the first centuries the reconciliation of Christians who had committed particularly grave sins after their Baptism (for example, idolatry, murder, or adultery) was tied to a very rigorous discipline, according to which penitents had to do public penance for their sins, often for years, before receiving reconciliation. To this “order of penitents” (which concerned only certain grave sins), one was only rarely admitted and in certain regions only once in a lifetime. During the seventh century Irish missionaries, inspired by the Eastern monastic tradition, took to continental Europe the “private” practice of penance, which does not require public and prolonged completion of penitential works before reconciliation with the Church. From that time on, the sacrament has been performed in secret between penitent and priest. This new practice envisioned the possibility of repetition and so opened the way to a regular frequenting of this sacrament. It allowed the forgiveness of grave sins and venial sins to be integrated into one sacramental celebration. In its main lines this is the form of penance that the Church has practiced down to our day.