With certain exceptions, when the bankruptcy is discharged (or the court grants an annulment), a bankrupt is released from all unsecured debts incurred before the commencement of the bankrupcty.
Those debts included in the bankruptcy are often referred to as ‘provable debts’. Creditors for these debts are entitled to payment from the bankrupt estate but at the end of the bankruptcy period the bankrupt is released from the debt.
Bankrutpcy is for the benefit of the unsecured creditors of a bankrupt. Therefore, a secured debt like a mortgage is not affected by the bankruptcy of a person, although any shortfall between the sale of the asset and the debt is covered by bankruptcy as a provable debt.