system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5 What is bankruptcy and how does it work?
gpt
It's a formal declaration to the courts that you [as a business or individual] are in a situation where you have more debt than you are able to pay off (under the current terms of the loans/etc) and that you are seeking protection from the courts to remedy the situation.    

  The overall idea is that bankruptcy protections are in place so that overwhelming debt loads don't permanently cripple someone: instead we give a "second chance" of sorts 

The courts will often force the sale of non-essential assets and use any available funds to repay what can be paid, and discharge the rest.    Alternatively, the repayment terms of any debt may be modified to be more favorable to the debtor.