The bank will usually begin the foreclosure process on your home after you miss 4 mortgage payments on the home in a row.
After that 4th missed payment then the bank will then begin to file the paperwork and begin the foreclosure process and then you will get a notice to leave the home within a specified period of time if you can't stop the foreclosure process during that time.
If you're able to come up with the past mortgage payments and any balance owed for other fees you can usually stop the foreclosure process and remain in your home.
But if you cannot stop the foreclosure process then you usually have 30 to 60 days to pack up and leave the home or you'll be forced out by a sheriff.