It's not uncommon for someone to come to the U.S. on a nonimmigrant (temporary) visa, fall in love with an American citizen, then decide to remain in the United States illegally, even after their permitted stay on the visa expires. If they eventually marry, they might then hope to apply for U.S. lawful permanent residence (a green card) on that basis. One issue to consider, however, is that foreign nationals who were "unlawfully present" in the U.S. become inadmissible (ineligible for a visa or green card, for three years, if their unlawful stay was 180 days or more, and ten years if their unlawful stay was one year or more. Here, we'll discuss ways to get around this inadmissibility problem, either:
One way to solve the overstay-inadmissibility problem described above is to apply for the green card using a procedure called "adjustment of status." That means submitting an application for U.S. residence to, and more importantly attending an interview at, an office of U.S. Citizenship and Immigration Services (USCIS), all without leaving the United States. The great thing about that is that only applicants who are outside the United States and seeking to return are affected by the unlawful presence ground of inadmissibility; and by adjusting status, you wouldn't need to leave the U.S. for the consular interview that's normally part of the green card application process.
Not everyone is eligible to "adjust status," unfortunately. Those who aren't would need to apply for a waiver of that inadmissibility if they need to the U.S. and seek to return. But because you:
you are among the few people whose unlawful presence in the United States does not make a difference in your eligibility to use this U.S.-based adjustment of status procedure.
Nevertheless, anyone reading this who entered the U.S. without permission or inspection, or whose green card eligibility is based on a family or employment relationship that puts them in the "visa preference" category with a "priority date" in a category where a long waiting list has developed is probably not eligible for adjustment of status, and will have to go the consular interview outside the United States.
There are two main waiver forms that foreign nationals use to request that the U.S. government forgive or overlook their unlawful presence and grant them a marriage-based green card regardless.
The I-601A waiver tends to be the preferred one, because applicants can submit the application and receive an answer from USCIS before departing the United States for their consular interview (and risking that the waiver request gets denied and they're stuck outside for three or ten years, depending on the length of their unlawful stay). But not everyone qualifies to request one, not only because of strict eligibility criteria, but because this particular waiver can only be granted by USCIS if the applicant has no other grounds of inadmissibility.
The other possibility is the I-601 waiver, which you would not be able to receive an answer to until you're already in your home country attending your consular interview.
There's nothing automatic about these waivers, and you'll need to do far more than fill out a form. Most notably, you'll need to prove that your U.S. relatives will suffer extreme hardship if you aren't granted the waiver and U.S. residence. Learn more about waivers of inadmissibility and how to apply.
See the Marriage-Based Visas and Green Cards section of Nolo's website or get the book Fiance and Marriage Visas: A Couple's Guide to U.S. Immigration, by Ilona Bray (Nolo), which contains comprehensive, easy-to-understand instructions on eligibility and application procedures. And for a personal analysis of your situation and assistance with gathering documents, preparing paperwork, and more, consult an experienced immigration attorney.