Bankruptcy is a way of handling debts a person is unable to pay.
Being declared bankrupt means the slate is wiped clean - eventually. A person who is declared bankrupt will lose control of all of their assets, including the family home, and have their debts written off; although they will be allowed to keep things that are needed for work or for household purposes (i.e. bedding).
A person can be declared bankrupt either by applying to the court on their own behalf, or as a result of a creditor making a petition to a judge.
There are serious implications to entering bankruptcy, however. In addition to an official receiver being able to sell almost everything owned, bankrupts are barred from a string of jobs, need court permission to do other jobs, for a fixed period and the bankruptcy order stays on their credit record for six years - making it far harder to open bank accounts, get credit cards or a mortgage.
Bankruptcy should only be considered as a last resort after examining all other options for repaying creditors.