Mortgage foreclosures can happen as fast as a few months time. You will get a foreclosure summons in the mail which allows you 20 days to submit a formal written response. If nothing is done within that 20 day period, a default will take place. A final summary judgement hearing will be held by the plaintiff. This is where the judge permits a judicial sale to take place in 20 days time. Technically, your home could be sold on the market in as little as 40 days. This is why it is most important to quickly research your options.
There is a difference between going through foreclosure and being foreclosed on.
Going through foreclosure is the entire process the lender follows in order to legally auction off your home to satisfy the debt. When you home is in foreclosure you still own it.
Having been foreclosed on means the home has been sold at auction. After your home is foreclosed on you no longer own it. It depends on the state you live in and what the the new owner wants to do to determine when you must move out.