THE SACRAMENT OF PENANCE
Confession to a priest is an essential part of the sacrament of Penance: "All mortal sins of which penitents after a diligent self-examination are conscious must be recounted by them in confession, even if they are most secret and have been committed against the last two precepts of the Decalogue; for these sins sometimes wound the soul more grievously and are more dangerous than those which are committed openly."
According to the Church's command, "after having attained the age of discretion, each of the faithful is bound by an obligation faithfully to confess serious sins at least once a year." Anyone who is aware of having committed a mortal sin must not receive Holy Communion, even if he experiences deep contrition, without having first received sacramental absolution, unless he has a grave reason for receiving Communion and there is no possibility of going to confession. Children must go to the sacrament of Penance before receiving Holy Communion for the first time.
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.
More information can be found at the Vatican website here.