If you are a nonresident alien for tax (see the tax residency guide), you file Form 1040-NR, not Form 1040. Many students and scholars are in this group for their first years.
You report mainly US income, such as wages, taxable scholarships and some US investment income.
You usually cannot take the standard deduction. Students and business apprentices from India are an exception under their tax treaty.
You usually cannot file jointly with a spouse.
Many credits for residents, such as education credits, are not available.
Bank interest from a US bank is generally not taxed for nonresidents.
Why popular tax software can be wrong
Most consumer tax software and IRS Free File products are built for Form 1040. If you use them as a nonresident, you may claim deductions and credits you cannot have. Later the IRS can ask for money back with penalties, and a wrong resident return can cause questions in future visa or green card applications.
Your school or employer: many universities give international students and scholars free access to nonresident tax software, such as Sprintax or Glacier Tax Prep. Check the international office's website or emails from February.
VITA: free IRS volunteer sites. Some sites have volunteers trained for nonresident returns; call first and ask "Do you prepare Form 1040-NR?"
A paid tax professional who works with nonresidents.
Wait for all forms: W-2, 1042-S (scholarships, treaty income), 1098-T if any.
Confirm your residency status for the year.
Prepare Form 1040-NR (in the software or with a volunteer).
Prepare Form 8843 for you and each family member.
Prepare your state return if your state has income tax. Nonresident tax software often helps with this.
File. If you had wages, the deadline is April 15. If you had no wages with tax withheld, it is June 15.
No income at all: file only Form 8843.
Any wages: usually yes, even if all tax was withheld, and you may get a refund.
Taxable scholarship (for example, money for housing beyond tuition): often yes.
Spouses and children in F-2 or J-2 status also need Form 8843 each. A J-2 spouse who works files their own return. A dependent with no SSN may need an ITIN if they are on a return.
Filing Form 1040 in the first years because friends do.
Claiming the standard deduction without a treaty that allows it.
Missing the tax treaty benefit for your country (see the tax treaties guide).
Throwing away Form 1042-S.