Before you can file a tax return, you must have either a Social Security number (SSN) or an individual taxpayer identification number (ITIN). If you're eligible to work in the U.S., you already have an SSN, because it's required to work in the U.S. Acquiring an SSN if you don't have one yet requires you to submit an application to the Social Security Administration, which you can download at the agency's website. You also can visit your local Social Security office. To get an ITIN, you have to fill out form W-7 and bring it to the proper IRS office with the appropriate documentation (call ahead, as not all IRS offices give out ITINs). If you're not in the U.S. yet, the U.S. consular office in your country can help you get an ITIN.
A quick overview of the U.S. income tax system will make it easier to understand the rest of the process. The IRS is the government agency that collects taxes. The agency doesn't track your income and assess your income tax for you -- you have to do it yourself. Your employers should send you documents at the end of the year showing your income. Other sources of income, like interest, capital gains or real estate income, you will have to keep track of yourself. All of this income must be reported to the IRS using the proper forms (we'll get into which forms to use shortly).
The other important thing to know is that your U.S. employer withholds part of your income to be put toward your income tax. When you file your taxes, there's a chance the amount withheld exceeds the amount you actually owe, in which case you'll get a refund either through a check mailed to you or via a direct deposit in your bank account. While the process of submitting a tax return is onerous, you could get a significant amount of money back.
If you're a resident alien, there's good news and bad news. The good news is that you're taxed just like a U.S. citizen. There's plenty of documentation and assistance available for dealing with that kind of taxation (you even use the same forms: 1040, 1040A or 1040EZ), but it's far too large of a topic to cover here. The bad news is that resident aliens get taxed on their worldwide income. Any money you earn, no matter where you were when you earned it or where the employer that pays you is located, is subject to U.S. income tax.
Up next, nonresident and dual-status aliens.