Depending on your source of information, here are possible answers.
Sites like RealtyTrac provides information on pre-foreclosure properties whereby Notice of Default have been filed against the properties for missed payments of mortgage or taxes. The $20K you saw for the same property may be the amount of default. This doesn't mean the property will be sold for that amount, or if it's sold at all.
Homeowners have options available to them to save their homes, such as forbearance, reinstatement, loan modification. If all of these fail, they can first attempt to sell the property as short sale in order to salvage their credit scores (which will still take a hit, but not as badly as a foreclosure or bankruptcy).
The $800K you saw for the same property may be the actual market value, or the tax assessed value of the property.
I know of a case where a homeowner's home has defaulted fo $28K, and the home will be auctioned next week, with a starting bid of close fo $900K because that's how much the property is worth today.
Unless you have a lot of ready cash, you can attempt to buy property sight unseen at an auction --- but beware that you may not be able to get title insurance.
There are so many bank-owned properties for sale today ---- why not engage a realtor to help you locate these homes, and guide you through the negotiation process? You can go to the properties, do your own visual inspections and determine whether or not you like a property enough to make an offer. Get a Buyer's agent to help you write the offer on a foreclosed listing. The REO listing agents have so many of these listings that they won't be able to adequately represent you, much less negotiate for you. You may leave money on the table by not negotiating.