Open Question: Process for buying a foreclosed home?

I am trying to buy a foreclosed home that did not sale at the courthouse door. I put in a bid, and it is at the bank....