The traditional definition of a sacrament is this: "A sacrament is a visible sign, instituted by Christ, to give grace." Within this definition there are three important statements:
An action is performed by a minister (usually a priest).
For example, when a baby is baptized in the church the priest pours
water over its head and at the same time says the words "I baptize
you in the name of the Father and of the Son and of the Holy Spirit."
That is a visible sign.
The Lord Jesus Christ instructed His church to offer the seven
sacraments to His followers. For example, His directive to His
disciples in Matthew's Gospel (28/19), "Go then, to all peoples
everywhere and make them my disciples; baptize them in the name
of the Father, the Son, and the Holy Spirit and teach them to obey
everything I have commanded you."