"Bankruptcy" is the legally declared inability of an individual or organization to pay its creditors. When a company files for bankruptcy, they do so in Federal Court under the Bankruptcy Code. Creditors may file an "involuntary bankruptcy" petition against a debtor in an effort to recoup what they owe. However, in most cases, bankruptcy is initiated by the debtor, and this is called "voluntary bankruptcy".
To file for bankruptcy, one must always include :
Any individual, partnership, or corporation can qualify for Chapter 7 bankruptcy. However, in order to qualify, one must have received credit counseling from an approved agency. Firms filing this form of bankruptcy are past the stage of reorganization and must sell off all un-exempt assets to pay creditors. The creditors collect their debts according to the seniority of their debts. A trustee is appointed, who ensures that any assets that are secured are sold and that the proceeds are paid to the specific creditors.
For example, secured debt would be loans issued by banks or institutions based upon the value of a specific asset. Whatever assets and residual cash remain after all secured creditors are paid are pooled together to be paid to any outstanding creditors with unsecured loans: e.g. bondholders and preferred shareholders.
Keep in mind that only an individual debtor (as opposed to a corporation or partnership) may be discharged. In other words, an honest, individual debtor is eligible to lose all liability for a given debt so that he or she may be given a "fresh start." 
A chapter 11 bankruptcy, governed by Chapter 11 of the Bankruptcy Code. allows the company to stay in business while a bankruptcy court supervises the "reorganization" of the company's contractual and debt obligations. The court can grant complete or partial relief from debts and contracts, allowing the company can make a new start.
Chapter 11 bankruptcy doesn't put personal assets of those involved with a given corporation (other than their stock within the company) in danger. However, if the debtor is an individual, both business and personal assets will be involved. If the company filing is a partnership, the lines are slightly blurrier—in some cases the individual partners' personal assets may be at stake. 
Often, if the business's debts exceed its assets, then at the completion of bankruptcy the company's owners all end up without anything; all their rights and interests are ended and the company's creditors are left with ownership of the newly reorganized company.
Chapter 11 bankruptcies can be extremely complicated and expensive (in terms of legal and consulting fees) for an organization.
Chapter 13 allows individuals to undergo a financial reorganization supervised by a federal bankruptcy court. The Bankruptcy Code anticipates the goal of Chapter 13 as enabling income-receiving debtors a debtor rehabilitation provided they fulfill a court-approved plan. This is in contrast to the goals of Chapter 7 that offers immediate, complete relief of many oppressive debts.
However, Chapter 13 bankruptcy has a few advantages for individuals who chose this instead of Chapter 7. The largest of these advantages is the opportunity for an individual to save his or her home from foreclosure. In addition, individuals may be allowed to reschedule secured debts, and thus may give them the opportunity to lower their monthly payments.