From the Catechism:
1113 The whole liturgical life of the Church revolves around the Eucharistic sacrifice and the sacraments. There are seven sacraments in the Church: Baptism, Confirmation or Chrismation, Eucharist, Penance, Anointing of the Sick, Holy Orders, and Matrimony...
1115 Jesus' words and actions during his hidden life and public ministry were already salvific, for they anticipated the power of his Paschal mystery. They announced and prepared what he was going to give the Church when all was accomplished. The mysteries of Christ's life are the foundations of what he would henceforth dispense in the sacraments, through the ministers of his Church, for "what was visible in our Savior has passed over into his mysteries."
1116 Sacraments are "powers that comes forth" from the Body of Christ, which is ever-living and life-giving. They are actions of the Holy Spirit at work in his Body, the Church. They are "the masterworks of God" in the new and everlasting covenant.
1118 The sacraments are "of the Church" in the double sense that they are "by her" and "for her." They are "by the Church," for she is the sacrament of Christ's action at work in her through the mission of the Holy Spirit. They are "for the Church" in the sense that "the sacraments make the Church," since they manifest and communicate to men, above all in the Eucharist, the mystery of communion with the God who is love, One in three persons.
1123 "The purpose of the sacraments is to sanctify men, to build up the Body of Christ and, finally, to give worship to God. Because they are signs they also instruct. They not only presuppose faith, but by words and objects they also nourish, strengthen, and express it. That is why they are called 'sacraments of faith.'"
1124 The Church's faith precedes the faith of the believer who is invited to adhere to it. When the Church celebrates the sacraments, she confesses the faith received from the apostles - whence the ancient saying: lex orandi, lex credendi (or: legem credendi lex statuat supplicandi, according to Prosper of Aquitaine [5th cent.]). The law of prayer is the law of faith: the Church believes as she prays. Liturgy is a constitutive element of the holy and living Tradition.
1125 For this reason no sacramental rite may be modified or manipulated at the will of the minister or the community. Even the supreme authority in the Church may not change the liturgy arbitrarily, but only in the obedience of faith and with religious respect for the mystery of the liturgy.
1126 Likewise, since the sacraments express and develop the communion of faith in the Church, the lex orandi is one of the essential criteria of the dialogue that seeks to restore the unity of Christians.
1127 Celebrated worthily in faith, the sacraments confer the grace that they signify. They are efficacious because in them Christ himself is at work: it is he who baptizes, he who acts in his sacraments in order to communicate the grace that each sacrament signifies. The Father always hears the prayer of his Son's Church which, in the epiclesis of each sacrament, expresses her faith in the power of the Spirit. As fire transforms into itself everything it touches, so the Holy Spirit transforms into the divine life whatever is subjected to his power.
1128 This is the meaning of the Church's affirmation that the sacraments act ex opere operato (literally: "by the very fact of the action's being performed"), i.e., by virtue of the saving work of Christ, accomplished once for all. It follows that "the sacrament is not wrought by the righteousness of either the celebrant or the recipient, but by the power of God." From the moment that a sacrament is celebrated in accordance with the intention of the Church, the power of Christ and his Spirit acts in and through it, independently of the personal holiness of the minister. Nevertheless, the fruits of the sacraments also depend on the disposition of the one who receives them.
1129 The Church affirms that for believers the sacraments of the New Covenant are necessary for salvation. "Sacramental grace" is the grace of the Holy Spirit, given by Christ and proper to each sacrament. The Spirit heals and transforms those who receive him by conforming them to the Son of God. The fruit of the sacramental life is that the Spirit of adoption makes the faithful partakers in the divine nature by uniting them in a living union with the only Son, the Savior.
1131 The sacraments are efficacious signs of grace, instituted by Christ and entrusted to the Church, by which divine life is dispensed to us. The visible rites by which the sacraments are celebrated signify and make present the graces proper to each sacrament. They bear fruit in those who receive them with the required dispositions.