According to the IRS, the W-9 form supplies a Taxpayer Identification Number to anyone who is required by law to file an "information return" concerning the taxpayer. Taxpayers give the form to whoever requested the information, not the IRS. For most individuals, their TIN numbers are their social security numbers.
The IRS indicates that a W-9 form is needed in many situations, such as when income is paid to the taxpayer or a real estate transaction has taken place. Other circumstances mandating a W-9 include when mortgage interest is paid, secured property is acquired or abandoned, a debt is cancelled or contributions are made to an IRA.