You can obtain citizenship through marriage to a U.S citizen, but not right away. There are two steps to the process. First, you need to obtain a Green card through your spouse, and secondly after remaining in the U.S as a Green card holder for the specified number of years required by the USCIS, you can apply for citizenship and become a citizen once the USCIS approves your application.
Obtaining the Green Card
If you are married to a U.S citizen and you live inside the U.S:
Your spouse must start the process of applying for your new Green card by submitting a petition called Form I-130 to the USCIS. You must submit a Form I-485, adjustment of status application too, in the same application package. Along with this petition, you need to submit your marriage certificate and all other documents required to prove that your marriage is genuine. You will then be called for an interview along with your spouse and if the USCIS finds your application good, you will be given a lawful conditional resident status. This takes a total of 10 - 13 months.
If you are married to a U.S citizen and live outside the U.S:
Your spouse must file the petition, Form I-130, Petition for Alien Relative with the USCIS. After this application is approved, the application is processed further by the National Visa Center and forwarded to the U.S Consulate in the spouse’s country. This process is quicker and takes around 10 months to be completed. You can enter the U.S with the immigrant visa obtained and you will be granted conditional resident status, without having to file any other paperwork.
Applying for Citizenship
You must first apply for the conditions on your permanent residence to be removed. The conditional resident card issued to you is valid for 2 years from the date of issue. You can apply for the conditions to be removed 90 days prior to the expiry of the conditional resident card. You must submit a joint application, Form I-751, for the conditions to be removed.
To apply for a u.s.citizenship, you must be a Green card holder for at least 3 years ( three years from the date of approval of your conditional permanent residence is sufficient) and must be in marital union with your U.S citizen spouse during that entire time. Along with these conditions, you must also satisfy the other requirements for applying for U.S citizenship. If you are eligible to apply for citizenship, you may file Form N-400 along with all the supporting documents to the USCIS. The naturalization process is long and takes time. You will be called for an interview and if your application is approved, you will take the Oath of Allegiance and formally become a citizen of the United States.
If you stop living together with your U.S citizen spouse during the three years, you must wait five years before you can apply to naturalize. If your marriage breaks up before you get the conditions on your conditional green card lifted, you may also face deportation.