Two issues are involved here: First, the medieval church’s regulation of the degrees of [consanguinity] (http://en.wikipedia.org/wiki/Consanguinity) and [affinity] (http://en.wikipedia.org/wiki/Affinity_(canon_law) within which people could not marry. Second, the shift in the 12th century to a “consent theory” of marriage by which a couple married each other by exchanging “words of the present [tense]” (verba de praesenti)—“I take you to be my husband/wife”—regardless of whether witnesses or a priest was present to bless the marriage. If they exchanged vows this way without witnesses or a priest, the marriage was said to be “clandestine” (secret). It was legal (i.e., a valid, binding sacrament) though not licit (i.e., allowed). The problem was that a man (or I guess sometimes a woman) could seduce a maiden into a clandestine marriage, sleep with her, and then deny that there had been any exchange of vows. He might even already have been married.
To combat both clandestine marriages and people marrying within forbidden degrees of relationship the [4th Lateran Council of 1215] (http://www.fordham.edu/halsall/basis/lateran4.asp) ordered (in Canon 51) this:
[W]e absolutely forbid clandestine marriages; and we forbid also that a priest presume to witness such. Wherefore, extending to other localities generally the particular custom that prevails in some, we decree that when marriages are to be contracted they must be announced publicly in the churches by the priests during a suitable and fixed time, so that if legitimate impediments exist, they may be made known.
In England, this public announcement was called “banns.” Priests were obliged to announce an upcoming marriage three Sundays in a row to allow anyone who knew of impediments to the marriage (clandestine marriage, couples related within forbidden degrees, bigamy) to come forward to “speak now or forever hold your peace.”
Source: I’m assuming you can find details in Jacqueline Murray’s Love, Marriage, and Family in the Middle Ages: A Reader (2001) or Frances & Joseph Gies’ Marriage and the Family in the Middle Ages (1989). I relying on my general knowledge.
It is directly related to the practice of publishing the banns of marriage, which is still done in the UK. Before a couple could get married, it is/was required that they publish, for several weeks beforehand, notice of their intent to be married (there are now in Britain alternative procedures available as well). "Bann" simply means "proclamation".
Objections would not be something like "I just don't think these two are right for each other," but a real impediment that makes it not a legal marriage. For example, if one party is already married and had not been legally divorced, there could not be a valid marriage. (It used to be quite common for men to simply abandon their wives, since divorce was much harder to obtain in the past.)
The Catholic Church (and possibility others, like the Anglican Church), also has very complex rules about consanguinity—how closely a couple may be related to have a legal marriage. If too close, there can be no marriage, unless a special dispensation is granted.
Another possibility is that of a forced marriage: if anyone had evidence that either party was being forced into the marriage against his or her will, then that of course would also make it invalid.
Finally, there were then as now laws creating a minimum age for marriage. The Marriage Act of 1753 made 21 the minimum age for marriage, unless parental consent had been obtained. Since premarital sex was highly discouraged, young lovers would often try to get married quickly and without the approval of their parents. Parents of people under 21 could forbid the issuing of the banns and block the marriage. As a result, many couples eloped to other towns where their parents couldn't find them to block the banns, or to Scotland—where one could get married at the age of 16 without parental consent.
The "speak now or forever hold your peace" is just a sort of "last call" for these banns. It would be highly unlikely for anyone to actually announce an objection at the ceremony—it could be done several weeks before—but it provided a final warning that the period for objections to the invalid marriage was about to expire. And, as stated, these objections would be only to the legality of the marriage, not the wisdom of it.
A marriage can of course be annulled after the fact, but this is a more difficult process, so it would be important to have these concerns dealt with beforehand.