As a U.S. citizen or resident, you are subject to U.S. federal income tax on your worldwide income. But if you had earned income in a foreign country, you may be able to exclude that income for U.S. tax purposes.
U.S. citizens and residents who are living in a foreign country are subject to the same income tax laws that apply to citizens and residents living in the U.S. But there is a provision in the tax code that allows U.S. citizens and residents to exclude a certain amount of foreign earned income from their taxable income for U.S. tax purposes.
These special tax rules apply to U.S. citizens and residents. For U.S. tax purposes, persons who are not U.S. citizens are considered to be either resident aliens or nonresident aliens. Internal Revenue Service (IRS) Publication 519, U.S. Tax Guide for Aliens, explains the criteria that are used to determine whether an individual is considered to be a resident or nonresident, and the resulting tax consequences of that determination.
The importance of determining whether you are considered a U.S. resident, for these purposes, is to determine your eligibility for the foreign earned income exclusion and foreign housing exclusion or deduction, which applies only to U.S. citizens and residents.