A bar to reentry is a type of grounds for inadmissibility - something which prevents admission to the United States. There are several of these, but this one is triggered by "unlawful presence" here.
When does a foreign national become subject to one of these bars?
An individual becomes subject to these particular bars by accruing "unlawful presence" in the U.S. - by being here without valid status in certain circumstances - for a given period of time AND THEN leaving the U.S.
These periods of unlawful presence are 180 days for a three year bar to re-entry, and one year for a ten-year bar to re-entry. Remember: even if the foreign national accrues 180 days or one year of unlawful presence, the person does not become subject to the bars until the person leaves the U.S.
How does a foreign national "accrue" unlawful presence time - is it just like being out of status?
No, unlawful presence isn't the same as not being in status or violating status - fortunately, not everyone who is without status or who has violated status accrues unlawful presence.
Unlawful presence can start to accrue when a visa expires, or when someone enters illegally, or when an immigration officer or judge makes a determination that a person is out of status.
However, there are a few exceptions or unique features. If a person is under a certain age, unlawful presence time doesn't accrue - even if that person is otherwise out of status because their visa expired or they entered without inspection. Certain visa types, if admitted a certain way, don't accrue unlawful presence unless an immigration official or judge makes a determination that they are out of status - even if their paperwork makes it appear that their status has expired. Therefore, this is one area where it is critical to consult an immigration lawyer before doing anything.
Am I still subject to the three and ten year bars if I marry a U.S. citizen or if a U.S. employer sponsors me for a green card?
Yes. Neither of these things removes the three or ten year bars to inadmissibility once a foreign national has become subject to one of them.
Remember that the permanent residence process includes a petition for an immigrant visa, during which one needs to demonstrate a basis for the foreign national obtaining permanent residence, and the Adjustment of Status or Consular Processing portion, where it must be demonstrated that there is no reason NOT to grant the foreign national permanent residence.
Marriage to a citizen or employer sponsorship would each be a basis of qualification for an immigrant visa, but the three- or ten-year bars to reentry remain as grounds of inadmissibility at the Adjustment of Status or consular processing stage.
Once subject to the three- or ten-year bars to reentry, is there any way a foreign national can overcome these bars?
Yes. Aside from simply remaining overseas for the three or ten years, there are waivers available. However, these waivers are relatively difficult to obtain and there are only certain circumstances which permit a foreign national to get them. A qualified immigration attorney should be consulted to determine the likehood of a waiver for each specific situation - preferably before a foreign national has become subject to the bar.