"Naturalization" is the process by which an immigrant with a green card becomes a citizen of the United States. Contrary to common myth, marrying a U.S. citizen or lawful permanent resident doesn't allow you to apply to naturalize right away. But it is a first step along the way. After getting married, you must get a green card, then spend a minimum number of years in the U.S. as a lawful permanent resident and meet various other requirements before applying to become a citizen.
Rights of Green Card Holders Compared With Rights of U.S. Citizens
As a green card holder (lawful permanent or conditional resident), you'll be able to live in the United States indefinitely, get a a Social Security Number (if you didn't get one already, using a work visa or permit), work here, and travel (so long as you don't abandon your U.S. residence and settle in another country, in which case you may not be allowed to return). You'll be given an identity card (which isn't actually green) that has your photo, in order to prove your status.
But your status as a green card holder isn't entirely secure. If you violate U.S. laws, fail to keep U.S. Citizenship and Immigration Services informed about your changes of address, receive government assistance, or otherwise become removable or inadmissible, you may jeopardize your right to stay in the U.S. or in some cases, to return after a trip outside. That's why you'll want to apply for U.S. citizenship as soon as you're eligible.
U.S. citizens gain rights to vote, obtain a U.S. passport, serve as a juror in court, and more. They are no longer at risk of being deported for violations of the law. (However, if you obtain your green card through fraud, even becoming a U.S. citizen won't protect you if the immigration authorities eventually find out.)
Applying for a Green Card Based on Marriage
When an alien marries a United States citizen, he or she becomes what's known as an "immediate relative," or immediately eligible for an immigrant visa (green card). If an alien marries a lawful permanent, he or she becomes what's known as a "preference relative," in category "2A," also eligible for a green card or immigrant visa, but not right away. A limited number of visas are available in category 2A every year, which usually means that applicants must wait a few years between the start and finish of the application process.
Note that, as of 2013, same-sex marriages are recognized under U.S. immigration law -- provided the marriage is legally recognized in the U.S. state or the country where it took place.
The application process for a green card based on marriage is long and complex. It begins with the U.S. citizen or permanent resident (the "petitioner") submitting a visa petition to USCIS, proving that you're married, and requesting approval to move forward with your green card application. (In a few cases, however, these two steps can be collapsed into one.) At the end of the process, the immigrant will need to attend an interview at either a U.S. embassy or consulate in his or her home country, or at an office of USCIS in the United States. (In the latter case, the U.S. citizen or permanent resident spouse is also expected to attend.)
Complications for Immigrant Spouses Living in the United States Illegally
If you entered the United States without inspection, or stayed beyond the time allowed under a visa, even marrying a U.S. citizen or permanent resident may not help you. This is because people who spend unlawful time in the United States and then leave (which you may have to do in order to attend your interview at a U.S. consulate) may be penalized by a bar on reentry of three or ten years. See a lawyer for the details and a personal analysis.
If you're lucky enough to have both entered the U.S. legally and married a U.S. citizen (not a permanent resident), then you'll probably be able to avoid this problem, but see a lawyer anyway, just in case. And note that entering "legally" does not mean using a tourist or other visa with the secret plan of getting a green card based on marriage -- that's visa fraud, and will get you nowhere.
Rights of Spouses of U.S. Citizens to Apply for Naturalization Early
If you get your green card based on marriage to a U.S. citizen, you are allowed to apply for citizenship three years after the date when your green card was approved, provided you remain married and living together during that period. This is true even if you were a conditional resident during the first 2 years of having a green card -- those 2 years count toward the 3 required.
More about U.S. citizenship through naturalization.