ITINs can be a tricky matter in that there are several tax forms requiring a non-resident with US-sourced income to have one, yet applying for the ITIN itself requires a great deal of paperwork and can take a while to process.
The fastest and easiest way to obtain an ITIN is if you already have enough income and/or taxes withheld to merit filing a tax return, to go with the W7 form. This route takes about 4-6 weeks for processing off tax season; 8-10 weeks during peak tax season, January-April.
If you anticipate earning income and/or are aware of any tax treaty benefits that would either make you exempt from US taxation, subject to a lower tax rate, or subject to a lower withholding rate you can also file ahead of time by including the proper exemption form (Form 8233 for independent and dependent personal services) with the W7 form detailing how much you expect to earn for the given tax year, the reason you meet the tax treaty exemption, and the tax treaty and article number.
A worthy read would be IRS Publication 901, which gives basic overviews of the tax treaties the US has with other countries, so you can see if you qualify for any tax treaty benefits. The default withholding rate for US-sourced income to non-residents is 35%, Publication 901 dictates what types of income are taxed or withheld at a different rate; or exempt from US taxation altogether depending on your home country. Expanded versions of the tax treaties themselves can be found in most tax law and international relations databases.
Remember, if you have a spouse or dependents, they also will need ITINs in order to be claimed on your US tax return. Like with just one individual, it usually works the fastest to file a tax return and request ITINs for each person at the same time; although each person needs their own individual W7 form filled out and documentation attached.
Be aware that there will also be some slight financial setbacks in terms of obtaining the documents the IRS requests for yourself plus spouse and/or dependents. An apostille, a notarized copy of your passport signed by a US notary, usually is the best form of identification to use in that it states your identity and non-resident status. One usually has to go to an American embassy in a major city to obtain one.
I would strongly suggest using tracking/recorded delivery when mailing in a W7 form and corresponding documentation, and never send original documents as the IRS tends not to send them back. It may cost more than normal postage, but since you are sending time-sensitive information it is worth it to be able to track it.