It depends on the type of debt you have. Bankruptcy is a good vehicle for eliminating credit card, medical debt, deficiencies resulting from a repossession or foreclosure, and other unsecured debt. In a Chapter 7 bankruptcy, this debt is discharged at the end of your bankruptcy. In Chapter 13 bankruptcy, you may have to pay off a portion of your unsecured debt through your repayment plan. Keep in mind that if you have debts secured by property (such as your home or car), the cancellation of the debt does not mean you get to keep the property. To learn what happens to secured property in bankruptcy, see Nolo's article Bankruptcy FAQ (Chapter 7 and 13).
Some debt is never discharged (canceled) in bankruptcy -- including child support and spousal support arrears, student loans (except in very limited circumstances), and tax debts first due within the previous three years. To learn more about which debts can be wiped out in bankruptcy, see Nolo's article What Bankruptcy Can and Cannot Do.