If debts are canceled without the filing of a bankruptcy case, you can owe taxes, it just depends. There may be "exclusions" that make it so you don't have to pay taxes on the cancelled debt, it just depends on your situation. IRS Publication 4681 discusses "Canceled Debts, Foreclosures, Repossessions and Abandonments." You can either read about how it works, or consult with a competent tax advisor. For a video from National Taxpayer Advocate Nina Olson concerning taxes on cancelled debts, click here.
But if debts are discharged in bankruptcy, you generally do not owe income taxes on the amount forgiven. See the Internal Revenue Code, 26 U.S.C. Section 108(a)(1)(A). However, you may still receive a 1099-C from a creditor.
If you do receive a 1099-C, you may need to file IRS Form 982 with the IRS to make sure the IRS understands why you do not owe income taxes on the cancelled debt.
Also, bear in mind that even though you don't have to pay income taxes on debts discharged in bankruptcy, certain tax attributes that you may have are reduced to the extent your debts have been forgiven. For example, if you have a loss carryforward, this tax attribute may be reduced or eliminated, depending upon how much debt that was discharged in your bankruptcy case. Again, seek qualified tax help if you have questions.