FIRST: Filing bankruptcy is not a step to be taken lightly. It WILL have a negative impact on your ability to obtain credit for many years. It will be harder, not impossible, to find a place to rent or to buy a car. Can you get credit after a bankruptcy? ABSOLUTELY. But you will also pay more than other people for it. Finally, some people just do not have a life...they will read about you in the newspaper and gossip. Filing bankruptcy is a drastic solution, but it is a SOLUTION.
When the only light in the tunnel is the train chasing you, bankruptcy is a tool for giving you a fresh start.
A Chapter 7 bankruptcy is a total liquidation of certain types of debt. In other words, it wipes out certain types of debt completely: you are no longer legally obligated to pay that debt. What debts will be legally "erased"? Unsecured debt of most sorts is completely liquidated. If you have credit card debt on a Visa, Mastercard, Discover or American Express (to name a few), you will not be required to pay the debt. If you borrowed money from family or friends, you will not legally be required to repay that debt (although to keep the peace in the family, you may be MORALLY required to pay the debt). Items such as taxes and liens on property (mortgages) generally do not get discharged. There are exceptions to both items.
A Chapter 13 can have the same result as a Chapter 7 for unsecured creditors, but is more commonly used to deal with foreclosures and repossessions. It involves reorganizing your debts and making ONE PAYMENT to a court supervised trustee.
Total up your monthly living expenses (do not include payments on credit cards and other unsecured debt like hospital bills). If your living expenses are greater than your income, you need to talk to a bankruptcy attorney immediately.