If you rent your home, you should check your tenancy agreement to see if it says anything about bankruptcy. Some tenancy agreements have a clause that allows a landlord to end an agreement if a tenant becomes bankrupt. You will need to continue to pay your rent during your bankruptcy.
If you own your home, and there is some equity in it, it will usually have to be sold. (The equity is the amount of money that you would get after selling your home and paying off your mortgage). Your trustee will then pay the proceeds to your creditors. If you own your home jointly with someone else, the trustee will usually offer to sell your share to the other person. If the other person is unable or unwilling to buy your share, the trustee may have to apply to court for a court order for the house to be sold.
If you have family living with you in your home, such as a spouse, civil partner, and/or children, then the trustee must apply to court for an order to sell the house. The court can decide to delay the sale for up to 3 years or to not allow the sale at all. This is only likely if there are special circumstances, such as you having a disabled child and the house having been specially adapted for them.