Most non-nationals are liable for taxation on any income earned in the United States from the beginning of their arrival in the U.S. Income normally includes salary, scholarships/fellowships, income from U.S. mutual funds or U.S. bank accounts.
Taxes for each calendar year are reported in the Spring of the following year and tax forms are filed with both the U.S. Government (federal) through the International Revenue Service (IRS) and the U.S. state/s in which income was earned. For example, if you earned income in California (CA) and New York (NY) you would file separate state forms for both CA and NY.
Generally, all F-1 and J-1 students and their dependents are considered non-residents (NR) for tax purposes for their first five years in the United States and would file federal form 1040NR (long form) or 1040NR-EZ (short form). Scholars are typically considered NR regarding taxation for their first two years in the United States. H-1B, TN or O-1 status holders who have been in the U.S. for more than 183 days should go to the U.S. Internal Revenue Service (IRS) site resources to see if they should file resident rather than non-resident tax forms, specifically Publication 519 (U.S. Tax Guide for Aliens).
ALL non-residents and each of their dependents must file federal form 8843, Statement of Non-Residence, each tax season even if no income was earned. You should note that being a resident for tax purposes does not mean resident for immigration purposes.