Howdy Mary Pat! Here’s some info on the Sacraments, what they are and what they do. There’s a lot of great info on them at
Catholic.com and in the Catechism of the Catholic Church.
So, first of all, Christ, not the Church, instituted the sacraments. The Church is not the source of the grace they convey and the Church does not have the arbitrary disposition of them. The Church merely administers them on behalf of Jesus Christ. Thus the sacraments are the central element in the life of the Church and within the Church, forming the Mystical Body of Christ.
For a sacrament to be valid, it must be properly celebrated — that is, certain requirements set forth in Church law must be met. For this reason, no sacramental rite may be modified or manipulated except by the supreme authority of the Church, which itself may not act arbitrarily but always “in the obedience of faith and with religious respect for the mystery” of the sacramental liturgy.
Also, for a sacrament to be valid, the proper “matter” or “form” of the sacrament. The matter is the tangible material sign which is proper to each sacrament: for baptism, water; for confirmation, consecrated chrism; for the Sacrament of Reconciliation, the expression of contrition and the confession of sin; for the Eucharist, unleavened bread and wine from grapes; for the anointing of the sick, the blessed oil of the sick; for matrimony, one man and one woman exchanging marital consent; for holy orders, a baptized male. The form is the verbal statement that accompanies the matter of the sacramental rite.
Once again, Christ is always acting through the Sacraments He has given us. The Church has the authority to administer them from the authority that Christ has given her. Regardless of the personal state of the minister, if the proper intent and matter are present, the Sacraments are still valid.
Hope this is helpful!