1. Have been unable to consent to the marriage (ex: underage or incapacitated and even then if you continued to live as husband and wife after you became 18 or had capacity this may not apply).
2. One of you was already currently legally married to someone else (bigamy. Again there are even some exceptions to this.
3. Fraud (they lied about their identity, immigration status, etc).
4. Mental incapacity.
Even if you meet one of these requirements, you still need to file within therequired time period to get an annulment instead of a dissolution (divorce).In most cases, this time period is within 4 years of marriage.
If you meet the requirements, then the judge is like a magician and *poof* your marriage never happened.