You can buy a foreclosed home before, during or after an auction. Understanding the process helps you get the best deal.