Before his Ascension, Our Lord entrusted to the Church the power to forgive sins in his name: “If you forgive the sins of any, they are forgiven; if you retain the sins of any, they are retained” (John. 20:21), and so from apostolic times the Church has always exercised this essential aspect of her Divine constitution as the instrument of salvation in the world.
The Sacrament of Penance is the ordinary means by which the faithful are restored to sanctifying grace after having fallen into post-baptismal grave sin. (Cf. CIC, c. 960). It is also a channel of particular graces which assists the faithful in avoiding sin in the future, overcoming habits of sin, and growing in the life of supernatural grace and virtue.
“Those who approach the Sacrament of Penance obtain pardon from the mercy of God for the offence committed against him and are at the same time reconciled with the Church, which they have wounded by their sins…” (Cf. Lumen gentium no. 11).