According to the Catechism of the Catholic Church, "The sacraments are efficacious signs of God's 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." (CCC 1131)
The sacraments work because God is at work in them. The words and gestures that go along with each sacrament all have a purpose that carry out the power of God with them.
There are seven sacraments in the Catholic Church: Baptism, Reconciliation, Eucharist (Holy Communion, Confirmation, Matrimony, Anointing of the Sick, and Holy Orders.