People who go through a foreclosure can do a remarkable amount of damage to a house if they think the process was unfair or that the new owner is acting unreasonably. Also, the legal process to evict someone from a foreclosed property is often costly and time-consuming. So, to incentivize the former homeowners to move out peacefully and voluntarily, the new owner—usually the bank that foreclosed—sometimes offers them a lump-sum of money. This type of transaction is called a "cash-for-keys" deal.
A cash-for-keys arrangement often works like this: After your legal right to live in the home ends, whether that's shortly after the sale or at the end of a redemption period, you'll receive a letter from the new owner (again, usually the bank) or someone acting on the new owner's behalf, offering you a specific amount of money. Typically, the amount will be a few hundred to a few thousand dollars. In exchange for the funds, you'll have to agree to vacate the home by a set deadline. You'll have to leave the property in "broom swept" or "broom clean" condition, which means you've cleaned up the place, didn't vandalize anything, cleared out your trash, and didn't strip the home of fixtures, like appliances, lights, or copper wiring.
If you move out by the deadline and leave the property in satisfactory condition, then you'll get the money. You'll likely have to agree to a final inspection where you'll hand over the keys and get payment. The money you get is supposed to help pay for your relocation costs.
Banks commonly offer cash-for-keys agreements after foreclosures and during evictions, and sometimes as part of a deed in lieu of foreclosure agreement. You're more likely to get this kind of offer if the bank is the buyer at the foreclosure sale and the property becomes REO. Having a cash-for-keys policy is a standard procedure with many foreclosing banks.
If a third party buys the home at the foreclosure sale and doesn't offer you a cash-for-keys deal, consider proposing one. You'll have to move out eventually anyway, and you might as well try to get some money to soften the blow.
For the new owner, providing a cash-for-keys deal is usually faster and much cheaper than pursuing an eviction and possibly having to fix up a damaged property after the disgruntled homeowner moves out. So, if the new owner offers you money to leave, but you think it's unfairly low, ask for a higher amount.
Though, don't get greedy. You shouldn't ask for more than what you reasonably believe you'll need to relocate. If you ask for too much, the bank or other new owner might withdraw the offer.
If you're not comfortable negotiating a cash-for-keys deal on your own—or you have questions about how long you can legally live in the property—consider talking to a foreclosure lawyer. An attorney can tell you about your options before and after a foreclosure sale, inform you about foreclosure procedures in your state, and help you work out a cash-for-keys deal to help cover your relocation costs.
If you can't afford to hire a lawyer, consider talking to a HUD-approved housing counselor.