Annulment (also known as "nullity of marriage" or "nullity") is a way to have what you thought was a legal marriage declared invalid. You may ask the judge to declare that your marriage is not valid by filing an Annulment. There are several reasons for why a judge may say that a marriage is not legally valid. For example: A marriage that is incestuous (between close blood relatives), or bigamous (where a spouse is already married to someone else) is never legally valid. Annulment is a rarely used proceeding.
To get an annulment, you must open a case and get a court date to have the judge decide whether or not an annulment should be granted. You may want to ask on your Petition that a divorce be granted in the alternative in case your annulment is denied. Instructions to start your Annulment.
To get a court date to have the judge decide if you get an annulment, do an Request for Order and choose the "Other" box on form FL-300. Type/write that you want to "Determine nullity of marriage" under the Other box.
Note: You may want to take a look at Summary Dissolution, as this is the easiest way to dissolve a marriage. It results in an easy divorce, however, not an annulment (voided marriage).
Note on Domestic Partnerships (another form of legally-established relationship, usually between same-sex couples): Dissolution, legal separation and annulment are handled in the same way. However, two different forms are used. Use form FL-103 (Petition) instead of FL-100, and use form FL-123 (Response) instead of FL-120. For complete instructions see Terminate Domestic Partnership