Marriage is generally defined as a contract between two people to create a life together as a family. The marriage ceremony, or wedding, cements this contract and creates a legal kinship where none existed before. The ceremony can be either civil or religious.
The officiant at a civil ceremony is a person authorized by the state to perform marriages, generally a justice of the peace, judge or, sometimes, a court clerk or mayor. These ceremonies provide the greatest leeway for couples wanting to depart from a traditional marriage ceremony. A civil ceremony can be almost anything you want, as long as it doesn't break any local laws and the officiant is legally able to marry you. No laws specify exactly what words or other ceremonial actions are necessary in a marriage ceremony, but generally, the officiant should make a statement to the effect that the couple has agreed, voluntarily, to be married. This makes it easier to prove a legitimate marriage took place. The couple is married once the ceremony is over, but in most jurisdictions, at least one witness to the ceremony must sign the marriage license. Then the officiant must submit it to the Department of Vital Statistics, or other appropriate agency. The marriage should be valid even without these steps, but again, it is easier to prove if the correct procedure is followed.
Most people still choose a religious ceremony, which is performed by the clergyperson of the religion within which the couple has chosen to get married. Each religion will have its own customs, vows and rites to incorporate into the ceremony. While civil ceremonies do not have to follow any particular format, most religions do require certain words or actions within the ceremony in order to recognize the marriage as valid. In the US, a church-recognized marriage is also recognized by the state, as long as the couple has a valid marriage license at the time of the ceremony. This is actually different from many other countries, where a religious ceremony is not a legal marriage, and must be held separately from the civil ceremony. Regardless of the type of ceremony, most states require that the couple be above a minimum age, unless they have parental consent, and of opposite genders. Most religions also forbid same-sex marriages.