When I am practicing immigration law, people often ask, “What if someone stays in the US unlawfully?” There are exceptions, but it normally depends on the amount of time a foreign national is "unlawfully present."
If Don Miguel, from Honduras, enters the US without proper inspection or documentation, it’s easy to calculate unlawful presence. It starts when he sets foot onto US soil.
If Genius Gabriella, a foreign national from Israel, gets a temporary visa to go to school in the US, then she will only accumulate unlawful presence after the I-94 date expires (the I-94 is the official US Arrival-Departure record).
So, after Gabriella finishes school in the US, unless there are unusual circumstances Gabriella must get a new visa, like a work visa, or go back to Israel. Or, she accumulates unlawful presence.
If the unlawful presence is 180 to 365 days of unlawful presence before she decides to take a flight from the US back to Israel, then she receives a “3-year bar” under INA section 212(a)(9)(B)(i)(1). This means that Gabriella won’t be able to visit her American friends in the US for 3 years.
If Gabriella accumulated 1 year or more of unlawful presence before taking the flight back to Israel, then the consequences are more severe. She suffers a “10-year bar” under INA section 212(a)(9)(B)(v).
Whenever a person is unlawfully present, there may be grounds for removal, when the government forces you to leave the US. Because people who overstay are barred from re-entering the US, the laws convince many foreign nationals to stay in the US! If person must leave the US and cannot return for long periods of years, then the person may risk removal, rather than voluntarily departing and waiting in the foreign country.
Certainly seek a lawyer's help if you had unlawful presence. Sometimes your record can be cleared. Specifically, there is a waiver available of the 3 and 10-year bars in INA section 212(a)(9)(B)(v). Or, there is other relief available that you will highly likely need help pursuing.
That's the law in a nutshell: the 3 or 10-year applies to someone who stays int he US without permission.