Proceeding as follows:
First Part :What a sacrifice is > Holy Mass > Why Holy Mass if offered and therefore why Catholics attend it; cf. PENNY CATECHISM, 275-279
Second Part: Sacraments > The Sacrament of Reconciliation (Confession)
275. What is a sacrifice?
A sacrifice is the offering of a victim by a priest to God alone, in testimony of his being the Sovereign Lord of all things.
276. What is the Sacrifice of the New Law?
The Sacrifice of the New Law is the Holy Mass.
277. What is the Holy Mass?
The Holy Mass is the Sacrifice of the Body and Blood of Jesus Christ, really present on the altar under the appearances of bread and wine, and offered to God for the living and the dead.
278. Is the Holy Mass one and the same Sacrifice with that of the Cross?
The Holy Mass is one and the same Sacrifice with that of the Cross, inasmuch as Christ, who offered himself, a bleeding victim, on the Cross to his heavenly Father, continues to offer himself in an unbloody manner on the altar, through the ministry of his priests.
Why Holy Mass and that's why Catholics attend Mass
279. For what ends is the Sacrifice of the Mass offered?
The Sacrifice of the Mass is offered for four ends:
first, to give supreme honor and glory to God; secondly, to thank him for all his benefits; thirdly, to satisfy God for our sins and to obtain the grace of repentance; and fourthly, to obtain all other graces and blessings through Jesus Christ.
249. What is a Sacrament? cf. PENNY CATECHISM, 249
A Sacrament is an outward sign of inward grace, ordained by Jesus Christ, by which grace is given to our souls.
281. What is the Sacrament of Penance (or Reconciliation)? cf. PENNY CATECHISM, 281
Penance (Reconciliation) is a Sacrament whereby the sins, whether mortal or venial, which we have committed after Baptism are forgiven.
A Catholic will give glory to God and benefit from Holy Mass and confession, if they do the 'why' of Holy Mass and confession as above.
On the webpage that opens after clicking the last link, scroll down to Q.286 that states the conditions for the penitent to meet for their sins to be forgiven.