If you've lost your home through foreclosure, you may still be on the hook for taxes. This can happen if the foreclosure sale price is less than the amount you owed on your mortgage or other liens against your home. The extra amount you owe is called the deficiency. If the deficiency amount is forgiven or cancelled by the mortgage lender, then the IRS or state taxing authority might treat the forgiven debt as income, and then you'll have to pay taxes on it. The same principles apply with short sales.
Fortunately, at least through 2013, most people who lost their homes through foreclosure will not face income tax liability. This is thanks to the federal Mortgage Forgiveness Debt Relief Act of 2007. But there are some exceptions, and some people might face capital gains tax.