Quick answer
Filing often pauses a foreclosure temporarily, but it does not by itself eliminate the mortgage or guarantee that the home can be kept.
General information, not legal advice about your situation. Laws, dollar amounts, and local rules change, so check current requirements with the official sources below or your court.
More detail
A mortgage lender may seek relief from the stay, especially if payments are not being made or the property lacks adequate protection. Chapter 13 may allow a debtor to cure arrears over time while maintaining ongoing payments. Timing, state foreclosure law, equity, exemptions, and plan feasibility matter.
Related official reading
These sources do not endorse Bankruptcy Buddy.