Theres a lot of talk in the United States about illegal immigrants.
I want to define some terms and situations that would make a persons presence in a foreign country "illegal".
The first way to be in a country illegally is to enter it without legal permission in the form of a visa, a travel document, a work permit, or other approval. This describes most of the Hispanic "illegals" in the U.S. who snuck across the Mexico-U.S. border. Lets call these Group A. Why are they here illegally? Because jobs exist here, and earnings, and because there is no legal way in present law for them to enter the country to take those jobs. There is no provision in the law for a foreign worker to enter the U.S. to take a job that, presumably, could be filled by an American with the same qualifications. And the jobs and earnings are so attractive that they risk their lives to get here. The legality of it hardly enters their minds, when the fact that so many others are doing it unpunished fairly shouts, "Yall come."
Group B consists of all those people - and there are hundreds of thousands of them, if not millions - who came here with legal permission to enter for a limited time under certain conditions, and now they are here beyond that legal period of time or are doing things that are illegal under the type of permission they were granted. If thats too legal a description, try this. They got visas to become tourists but now they have a job here, without getting permission. or maybe they fell in love here and now they want to stay forever. This group is just as illegal as the first. They are just as subject to detention and expulsion.
Closing note: many Americans in foreign countries fit into Group B, having abused their legal permission to be there. Few Americans have snuck into a foreign country without legal permission, though I suspect there are a fair number of them in Cuba, North Korea, Iraq, Afghanistan, and other areas for which they wrent likely to get government approval.