If you file for personal bankruptcy under Chapter 7 a so-called “automatic stay” is placed on all your creditors, including the foreclosing lender, by the court. HOWEVER, the stay is only a temporary fix to the situation.
Chapter 7 by no means permanently stops home foreclosure. It only gives you relief from unsecured creditors like credit cards and prevents certain creditors from pursuing their collection action against you. It does NOT discharge debts such as taxes, child support, alimony or student loans, nor can it give you relief from other secured creditors — like your house lender — whose debt is secured by the house you’re living in.