The filing of a bankruptcy stops all collection activity against you and your property. It automatically stops all lawsuits, foreclosures, repossessions, bank levy’s, wage garnishments, creditor harassment such as collection letters and phone calls
For example, if your car has been taken (repossessed) by a creditor but has not been sold at auction you can get the car back by filing a Chapter 13 bankruptcy and providing for payment of the car through the plan.
I.E. – If a credit card company sues you for collection of the debt you can file a Chapter 7 bankruptcy before a default judgment is issued against you and discharge the debt before the creditor can obtain a judgment.
If your lender is foreclosing on you as long as you file the bankruptcy no later than one day before the foreclosure sale date you can stop the sale and buy yourself more time in the home or try and save the home using a Chapter 13 plan of reorganization to cure the arrears and pay for the house.