If you marry a U.S, citizen, you won't be eligible for U.S. citizenship right away. But you might become eligible for a U.S. green card (lawful permanent residence), which can lead to U.S. citizenship. However, there are certain requirements that must be met before you can apply for a green card and ultimately for U.S. citizenship after marriage to a U.S. citizen.
As the spouse of a U.S. citizen (whether same-sex or opposite sex), you are what's called an immediate relative in immigration law lingo. That's good news, because there are no annual numerical limits on the green cards issued under this category, and therefore no waiting lists before you can apply.
The U.S. citizen spouse must start the process for you, by submitting a visa petition on Form I-130 to United States Citizenship and Immigration Services (USCIS). The form must be accompanied by evidence of the marriage being legally valid, namely a marriage certificate, as well as proof that the marriage is bona fide, not merely a sham to get you a green card.
How the rest of the application process will be handled is more complicated.
If you, the immigrant, are living in the U.S. after a legal entry (i.e. on a visa or under the Visa Waiver Program), and you didn't arrive for the purpose of getting married (which would be visa fraud), then you should be able to adjust status. Adjustment of status (AOS) is the process of applying for a green card without leaving the U.S.; you submit all your paperwork to, and attend your in-person interview at, offices of USCIS. In fact, you don't have to wait for approval of the I-130 before submitting your AOS application. It can all be mailed in as one package.
If you are living overseas, then you must wait for the I-130 to be approved and for further communication from the National Visa Center (NVC) and your local U.S. consulate. The consulate will call you in for an interview, at which your immigrant visa will hopefully be approved. You'll use that visa to enter the U.S. and become a permanent resident (or a conditional resident, if your marriage is less than two years old when you enter the U.S.).
If you are living in the U.S. after an illegal entry, however, see an immigration lawyer. You cannot adjust status unless you are among a rare few people who fall under some old laws (Section 245(i)). But if you leave the U.S. for processing through a U.S. consulate, you risk being found inadmissible due to your past unlawful stay, and being unable to return to the U.S. for either three or ten years. (Three years if your unlawful stay was at least 120 days; ten years if your unlawful stay was at least 365 days.) There is a waiver you can apply for before you leave, however (the "provisional waiver," on Form I-601A), which an attorney can help you determine your eligibility for and prepare the application and supporting documents.
It's important to understand that, even though you've married a U.S. citizen, you have to meet certain criteria on your own before you can be granted a green card. This includes that you not be found "inadmissible." Intending immigrants can be found inadmissible for not only unlawful presence as described above, but any of the reasons described in Section 212 of the Immigration and Nationality Act (I.N.A.).
Some of the grounds of inadmissibility that most often cause trouble are those barring entry to people who have committed certain types of crimes, developed certain physical or mental illnesses, broken U.S. immigration laws, or appear likely to become a public charge (receive public assistance due to financial need).
As the spouse of a U.S. citizen, you're lucky. You don't have to wait until you've had a green card for five years to apply for citizenship through the process known as naturalization. Assuming you stay married to and living with your U.S. citizen spouse the whole time, you can apply for citizenship three years after obtaining a green card.
You'll also need to meet other requirements, such as having good moral character, having spent the majority of those three years living in the United States, being able to speak, read, and write English, and being able to pass a U.S. civics test.
The application for naturalization must be made by submitting Form N-400, Application for Naturalization, to USCIS.
You'll later need to attend a biometrics (fingerprinting) appointment and then to attend an interview at a USCIS office. There, your application will be reviewed and you'll be tested on your knowledge of English and civics. If you are approved, you will later be scheduled for a swearing-in ceremony, at which time you will become a naturalized U.S. citizen.
Marriage to a U.S. citizen does not guarantee a green card or U.S. citizenship. Applications for U.S. green cards through marriage are scrutinized carefully, because the government takes fraudulent marriage very seriously. An experienced immigration attorney can guide you through the complex maze of U.S. immigration laws and procedural requirements.