An ideal way to purchase a home that is about to be foreclosed upon is a presale. This is when someone can buy the house by communication with the current owner, before the foreclosure process begins or is finished. But this is easier said than done and often separates someone who has done their homework between someone who hasn't. There are some places to look for a potential presale home.
One way is to ask your local county offices how to search for new notices of default. You could also look in the local newspaper in the "legal notices" for upcoming houses in the local auction. Check for the name of the owner, the address of the house, and try to get in contact with the owner to see if you can strike a deal before the auction.
These are just some tips on how to find a potential deal in a home about to be foreclosed upon, which will get you started in the adventure of finding a deal on a new home for living or for an investment.