In foreclosure situations, mortgage holders will sometimes offer you money for vacating within a certain time period. This is called “cash for keys”
Basically, the mortgage lender is willing to pay you so they don’t need to fight you over possession of the property and you don’t trash the house. Actually removing you from the property after a foreclosure costs time and money and generally requires an attorney. Rather than paying the attorney, the mortgage lender will often give you $2000 or more to move out. Terms of the deal are usually that you move out within 2 weeks, you leave the property “broom clean” (basically you took everything that is yours out of the property and swept up the place.) and the property isn’t trashed.
So if you’re facing foreclosure, can’t afford to keep the place, and have somewhere else already lined up, look into the cash for keys offer (call up the lender and ask them directly. Obviously, the lender doesn’t want to pay you if they don’t have to). If not, stay in the house until the foreclosure is done and enjoy the cheap rent.