Being illegal can mean different things to different people. Here I am referring to all those people (more than 11 million!) who are present in the United States and either 1) entered without inspection, 2) entered with a visa and overstayed or even those who 3) are in status (student, tourist, etc.) but have somehow violated the terms of their visa, such as by accepting unauthorized employment.
Any of the above should be avoided as it may create huge problems should you apply for an immigration benefit in the future. However, if this is unavoidable in your situation, here is one thing you can do to prevent a permanent bar from the United States:
NEVER, EVER, SAY YOU ARE A U.S. CITIZEN!
Most immigration violations, criminal activities and other black marks in one’s history that often are grounds for inadmissibility or removability are waivable. For example, an individual who entered the United States on a B-2 (tourist) visa, overstayed the allowed period of admission, worked without authorization but was lucky enough to find the love of his or her life here still have hope. They may marry and be eligible to adjust status, despite the immigration violations. Even someone who committed a crime or has more serious grounds of inadmissibility may adjust or get an immigrant visa at a U.S. Consulate abroad if they file and get a waiver approved.
However, after they passed IIRIRA in 1996 (which came into effect in 1997), any claim to citizenship (with very, very few exceptions) are grounds for inadmissibility or deportability and are UNWAIVABLE.
The most common scenario in which foreign nationals get into trouble is when applying for jobs and checking the U.S. Citizen box Form I-9 (the Employment Eligibility Verification Form). Don’t do it! This one little checkmark may permanently bar you from ever receiving an immigration benefit.
How will immigration know? If they want to find out, they have the resources to do so. Avoid this one little mistake and avoid forever closing the doors to the United States behind you.