a resident alien is a person who has permission by the government to reside and work in the country.
a nonresident alien is a foreign national who is visiting a country as a tourist (e.g., for pleasure, for studies, on business, to receive medical treatment, to attend a conference or a meeting, as entertainers or sportspeople, and so forth).
an illegal alien is any foreign national inside a country where he or she has no legal right to be. It covers a foreign national who has entered the country through illegal migration. In some countries it also covers an alien who entered the country lawfully but subsequently fallen out of that legal status.
an enemy alien is a foreign national of a country that is at war with the host country.
Common law jurisdictions
An "alien" in English law denoted any person born outside of the monarch's dominions and who did not owe allegiance to the monarch. Aliens were not allowed to own land and were subject to different taxes to subjects. This idea was passed on in the Commonwealth to other common law jurisdictions.
In Australia, citizenship is defined in the Australian nationality law. Non-citizens in Australia are permanent residents, temporary residents, or illegal residents (technically called "unlawful non-citizens"). Most non-citizens (including those who lack citizenship documents) traveling to Australia must obtain a visa prior to travel. The only exceptions to the rule are holders of New Zealand passports and citizenship, who may apply for a visa on arrival according to the Trans-Tasman Travel Arrangement.
In Canada, the term "alien" is not used in federal statues. Instead, the term "foreign national" serves as its equivalent and is found in legal documents. The Immigration and Refugee Protection Act defines "foreign national" as "a person who is not a Canadian citizen or a permanent resident, and includes a stateless person."
The usage of the term "alien" dates back to 1798, when it was used in the Alien and Sedition Acts. Although the INA provides no overarching explicit definition of the term "illegal alien", it is mentioned in a number of provisions under title 8. Several provisions even mention the term "unauthorized alien". According to PolitiFact, the term "illegal alien" occurs in federal law, but does so scarcely. PolitiFact opines that, "where the term does appear, it's undefined or part of an introductory title or limited to apply to certain individuals convicted of felonies."
Because the U.S. law says that a corporation is a person, the term alien is not limited to natural humans because what are colloquially called foreign corporations are technically called alien corporations. Because corporations are creations of local state law, a foreign corporation is an out-of-state corporation.
There are a multitude of unique and highly complex U.S. domestic tax laws and regulations affecting the U.S. tax residency of foreign nationals, both nonresident aliens and resident aliens, in addition to income tax and social security tax treaties and Totalization Agreements.
"Alienage," i.e., citizenship status, has been prohibited since 1989 in New York City from being considered for employment, under that town's Human Rights legislation.
In the Arab states of the Persian Gulf (United Arab Emirates, Saudi Arabia, Kuwait, Oman, Bahrain, Qatar, etc.), many non-natives (foreigners) have lived in the region since birth or since independence. However, these Arab states of the Persian Gulf do not easily grant citizenship to the non-natives.
On Latvian passports, the mark nepilso?i (alien) refers to non-citizens or former citizens of the Soviet Union (USSR) who do not have voting rights for the parliament of Latvia but have rights and privileges under Latvian law and international bilateral treaties, such as the right to travel without visas to both the European Union and Russia, where latter is not possible for Latvian citizens.
^ abGarner, Bryan A. (June 25, 2009). alien (9th ed.). Black's Law Dictionary. p. 84. ISBN0-314-19949-7. Retrieved 2018. A person who resides within the borders of a country but is not a citizen or subject of that country; a person not owing allegiance to a particular nation. - In the United States, an alien is a person who was born outside the jurisdiction of the United States, who is subject to some foreign government, and who has not been naturalized under U.S. law.
^52 U.S.C.§ 30121(b) (explaining that "the term 'foreign national' means--.... (2) an individual who is not a citizen of the United States or a national of the United States (as defined in section 1101(a)(22) of title 8) and who is not lawfully admitted for permanent residence, as defined by section 1101(a)(20) of title 8.").
^Van Houtum, Henk. "The mask of the border." The Routledge Research Companion to Border Studies. Routledge, 2016. 71-84.