If you're still living in the property following the foreclosure sale, after a new deed has been recorded with a new owner's name on it, you go from homeowner to tenant. A common belief is that you aren't legally a tenant unless you've entered into a formal landlord–tenant relationship and agreed to pay rent. But, subject to a couple of exceptions, you're considered a tenant, typically termed a "tenant at will" or "tenant by sufferance."
The first step the new owner will take toward evicting you is typically to send you a written notice stating that you must move out. How soon you're likely to get such a notice depends on who owns your house after the foreclosure sale: a third-party buyer or the foreclosing bank.
If, at the foreclosure sale, your house is sold to a third party, that new owner will likely want possession of the property as soon as possible. You might receive a termination notice days or weeks after the auction or sale, just to get the process moving. Exactly when you can expect this termination notice will depend on the new owner's agenda and the experience the new owner has in removing tenants.
If the new owner wants to occupy the house and has experience in evicting tenants, you can expect the notice to come sooner rather than later. If, on the other hand, the new owner is a business that buys and resells foreclosed homes, there might be a delay before you get a termination notice, just for bureaucratic reasons. And if the new owner is a novice in buying foreclosed homes and has no experience in evictions, you can expect a delay while the new owner finds a property management firm or lawyer to do the work.
If the property is not sold to a new owner at the foreclosure sale—that is, nobody makes a bid that's higher than the bank's credit bid—the foreclosing bank will end up with title to the property.
If your house is in an area where values are relatively stable, there are few other homes for sale in the neighborhood, and it is in saleable condition, the bank will likely want you out yesterday and will move forward with an eviction quickly. In some places, the bank includes an eviction as part of a judicial foreclosure, while in others, the bank has to file a separate proceeding after a nonjudicial foreclosure.
Your termination notice might be accompanied by an offer to pay you a lump sum if you leave the property by a certain time, and leave it in good condition. This kind of offer is commonly called "cash for keys." Some former homeowners report offers as high as several thousand dollars, which, from the new owner's perspective, is cheap compared to what it would cost the owner if you dug in your heels and made a formal eviction necessary. Also, experience shows that unhappy former homeowners can do a remarkable amount of damage to a house if they think the new owner is being unreasonable.
Not all buyers or banks will make this sort of offer, and might be willing to spend hundreds or even thousands of dollars in lawyer fees to get you out. That said, you should always be willing to propose a move-out bonus if the new owner doesn't. And if the new owner does propose one, you shouldn't be shy about negotiating for a higher amount.