If your spouse is a non-resident alien, you have several choices:
You can file married filing jointly. To do so, your spouse will need to have either a social security number or a taxpayer identifying number. The IRS discusses the joint return election here: http://www.irs.gov/Individuals/International-Taxpayers/Nonresident-Spouse-Treated-as-a-Resident . Note: to use the joint return the non-resident alien would be treated for tax purposes as a US resident alien. That means they would be taxed on their worldwide income, although the foreign earned income exclusion may apply. The IRS discusses the joint return election here: http://www.irs.gov/Individuals/International-Taxpayers/Nonresident-Spouse-Treated-as-a-Resident .
You can file married filing separately. If you do and your spouse does not have US source income, he/she would not be required to file. If your spouse is a non-resident alien without an SSN/EIN you cannot e-file the return. You can print the return ignoring error messages for no spouse SSN and writing “NRA” in the SSN block for the spouse before you mail it.
If you have a dependent living with you, you may be able to file as Head of Household. To do so, you must not choose to have your non-resident alien spouse treated for tax purposes as a resident alien; you need a qualifying dependent living with you such as your child. The qualifying dependent cannot be your spouse and you cannot claim the Earned Income Tax Credit as you are still considered married for EITC purposes and are not filing a joint return. See See https://www.irs.gov/Individuals/International-Taxpayers/U.S.-Citizens-and-Resident-Aliens-Abroad---H...
If your spouse is eligible for an SSN apply at a social security office or US consulate. You must complete Form SS-5. You must also provide original or certified copies of documents to verify your spouse's age, identity, and citizenship. If your spouse is not eligible to get an SSN, he/she can file Form W-7 with the IRS to apply for an ITIN. Use IRS Form W-7 to apply for a Taxpayer Identifying Number. A copy is here: http://www.irs.gov/pub/irs-pdf/fw7.pdf . You need to attach your federal tax return to the application.
The tax return and W-7 cannot be e-filed. They are mailed to a special location:
Internal Revenue Service
Austin Service Center
P.O. Box 149342
Austin, TX 78714-9342
Hope this helps!