What is an annulment?

In an annulment the court rules that the marriage never existed. The court declares that the couple were never legally married, since the marriage was not legally valid.

An annulment is an entirely different entity than a divorce. In a divorce, the court ends a marriage that was legal and had duration. Annulments end what never had a legal footing in the first place.

Annulments used to be much more common, but they have fallen out of favor, now that the stigma of divorce has lessened or disappeared.
There are two types of civil annulments. One declares a marriage void ab initio, which means it is "a legal nullity from the beginning," and the other declares the marriage voidable nunc pro tunc (then for now). Both result in a legal declaration by a court that the marriage in question never existed.