I just want to know how long it takes
That question is a little difficult to answer these days because the lenders have so many properties to deal with and there is basically no specific start point, this is of course assuming that it is a trustee foreclosure and not a judicial foreclosure. There is no maximum, there is however a minimum. Once a property is 3 months delinquent, the lender may file and record a Notice of Default. Once the Notice of Default is filed and recorded, you have 90 days to cure the default. If the default is not cured within 90 days, a notice of trustee sale must be filed and recorded giving at least 21 days notice of the trustee sale.
As such, the fastest the property sold once the notice of default is given is 111 (90+21). However, if you are in default and you cannot keep your property you really should look at alternatives to foreclosure, there are many that are available which are less damaging to your credit. If you want to keep your property, you should consider loan modification or bankruptcy (chapter 13). Furthermore, you may be liable for deficiencies and balances even after foreclosure, so you should contact an attorney immediately.
If you would like to discuss these options, feel free to contact me.
Disclaimer: attorney's response is not intended as legal advice and is for informational purposes only. Inquirer should seek the counsel of a duly licensed attorney within that jurisdction.
Just one point to add to the previous answer - assuming you are in a "non judicial" state - litigation can dramatically change the timetable.
Here's what I mean. In Alabama, a non judicial state, if you have a legitimate basis to file a lawsuit against the mortgage company or mortgage servicer, then normally the issue of the foreclosure will not be resolved until your fraud or other claims are resolved. http://www.alabamaconsumer.com/CM/Articles/WrongfulForeclosuresInAlabama.asp
The best thing you can do is meet with a good foreclosure defense lawyer in your area that can talk with you about all of your options so you can evaluate what is your best move to make.
Good luck with everything....