Bankruptcy can be a path to clearing debts, it is a legal way to declare your inability to pay your creditors. If you have debts you cannot repay this could be a viable solution for you. Within bankruptcy you will stop paying your creditors and creditors can no longer chase you for outstanding payments. For people going into bankruptcy it can provide a fresh start for debt that could not be repaid.
Bankruptcy can be done voluntarily or can be actioned by the creditors you owe money to.