Because state laws govern, the exact process and amount of time that a foreclosure takes varies depending on where you live. However, there are certain commonalities associated with what happens during and after a foreclosure. Furthermore, in most cases, it can take several months for the foreclosure process to occur.

What happens after foreclosure depends a great deal on the circumstances. After the home is seized by the bank, you will no longer be permitted to live there. This means if you haven't moved out already, the bank or the new owner who buys the house at auction will be able to legally evict you by sending the sheriff.
The foreclosure will be reported as a foreclosure under the public records and judgment section of your credit report. This will lower your FICO score dramatically. A foreclosure has a similar effect to a bankruptcy and remains on your credit report for up to ten years. During this time, it may be difficult for you to obtain a loan or to buy a new home.
In some states and under certain circumstances, the bank may also attempt to obtain a deficiency judgment against you. A deficiency judgment is appropriate if the bank was not able to obtain the full amount you owed them at a foreclosure auction. For example, if you owed $100,000 and the bank could only sell your home for $75,000, then the bank would be able to sue you and obtain a deficiency judgment to collect the other $25,000 that you owed. This is not allowed in every state, but is possible.
If the bank obtains a deficiency judgment against you, the court will stipulate how they may satisfy the judgment. If you cannot pay the money due up front, the court may garnish your wages and/or put a lien on any property that you currently own in order to satisfy the judgment to the bank.
A home is a secured asset, which means that the home acts as collateral. In this way, it is distinct from credit cards and unsecured debt, where lenders lend you money and you can buy whatever you want with it. Because a house has value, it can act as a guarantee that you will pay the loan. If you don't pay the loan, the bank can seize the house and sell it to get back the money they lent you. Since it is a lot easier for banks to seize a secured debt in the form of a house than it would be for them to seize whatever you bought with your credit cards, the loan is less risky. As a result, mortgage interest rates tend to be lower than rates on credit cards and other unsecured debts.
Unfortunately, this means that if you can't pay your mortgage, you can lose your house to foreclosure. The pre-foreclosure process begins as soon as you miss a house payment. The bank will send you a notice of the missed payment, and a request for payment as well as a notice of any late fees that you incurred. This is usually called a demand letter.
The amount of time before a bank sends you a demand varies, but usually is about a month. Sometimes, it can be several months before you receive a demand letter, demanding that you make up the missed payments.
After a demand letter, if you still don't pay, the bank will send you a notice to accelerate. This means that you must pay the full amount due to bring your mortgage current. If you don't, the bank will begin the formal foreclosure process. During this entire time, you will likely be receiving collection phone calls. The length of time between notice of default and notice of intent to foreclose also varies depending on the state and the bank.
If you do not respond to the notice to accelerate with a full payment, the bank will go to the court and obtain a notice of default. This will give you a set period of time -usually 20 to 30 days- to respond to the notices and to make the payments due. If you fail to do so, the bank will send a notice of sale.
The notice of sale is the notification that the home will be sold. This is published in the newspaper under public records. The notice of sale contains the date that an auction will be held to sell the home. At the auction, the starting bid is often the amount of the balance due on the loan.
The bank will then sell the home at auction, if they can find a buyer who will pay the balance due on the loan or higher. If the money the bank obtains at the auction exceeds the amount due, including the amount owed in legal fees, then you'll be paid the difference.