Christ instituted the sacrament of Confession as the ordinary way of having sins, especially serious sins, forgiven. When the Lord Jesus breathed the Holy Spirit upon His apostles in the Upper Room and conferred on them the power to forgive sins in His name - "Whose sins you forgive, they are forgiven; whose sins you retain, they are retained" (John 20:23) - He bestowed one of the most sublime gifts upon His Church. Through the grace of ordination, the priest is able to act in the person of Christ, not in his own name, when he absolves sin.
As bodily creatures, the sacrament of Confession confirms our forgiveness by God and assures us of His love. How do you know your sins are actually forgiven? The words of absolution in the sacrament help us to understand and know that we are truly forgiven.
Moreover, Confession reconciles us not only to God but also to His Church, the communion of which is diminished by every sin that we commit. For an integral and valid Confession, Catholics must have sorrow for their sins and a genuine desire to repent and amend their lives.
Catechism on Confession
Catholic.com: Confession
Confessing sin to a priest: Is it biblical?
For further studies check out these FREE lectures (13 total) on the Sacrament of Confession