that really depends upon a lot of variables. Under normal circumstances you will have epproximately 1 month to vacate the premises. Could be up to 2 months depending on the situation.
Typically, depending on the company or bank handling the foreclosure, one can stay in the house for up to 90 days before being forced to vacate by police. However, it is not uncommon that one can stay longer if the bank or company holding the mortgage is lenient.
The length of time you have to vacate depends on the state you live in as well as the mortgage company that services your loan. Often times, it can be as little as 30 days, and I have also heard that sometimes you can take up to six months.
When you miss three payments then they start to foreclose. Once that process starts you'll get a letter to pay up. If don't then they'll send an intent to foreclose letter and finally a vacate letter. 4-5 months tops for everything.
It depends on the state. In California as the owner-in-residence, you have three days to vacate. In Arizona, as soon as the house sells at auction, you should have been gone. There are stories of new owners (typically banks and investors) who are allowing residents to remain.
Typically it takes 3-6 missed payments. If you are unable to bring the past due loan amount current, the bank or lender will transfer the loan into a loss mitigation department to either prepare the property for short sale or auction, or work with borrower to structure loan modification.