There are two main types of bankruptcies for consumers:
Chapter 7 - is a liquidation of assets followed by a discharge of debt. It is perhaps what you normally think of when you think of bankruptcy. Upon filing the bankruptcy, the Court assigns, through the US Department of Justice, an attorney called the "Trustee". The Trustee's job is to examine what you own and see if anything can be sold to pay any of your debt back, even if it is not the full amount. In exchange for a selling of your assets, you receive a total discharge of your debt, meaning that creditor can never take any action to collect on that debt you owe him or her ever again.
Chapter 13 - is essentially a consolidation payment plan. Rather than selling any of your property, you are promising to pay some or all of your debt back over the course of time (usually over the course of 3 to 5 years). You would file a Chapter 13 rather than a Chapter 7 when you have some property that you consider too valuable to lose in a liquidation, when you make too much money to qualify for a Chapter 7, or when you want a payment plan to help pay the arrears on a secured debt, like when you fall behind on your mortgage payments. In order to file a Chapter 13, you need to have enough income to make the plan work, so you need enough income for your normal expenses plus whatever the plan payments may be.
Other types of bankruptcies not necessarily for consumers that you may have heard of include Chapter 11 (reorganization of businesses) or Chapter 12 (reorganization for fishermen or farmers).