First step is to work with an agent that is familiar with foreclosures. If you've not been pre-approved for a loan do that as soon as possible or if you are paying cash (either for the full amount of the property or the downpayment) get a copy of your proof of funds. These two pieces are usually needed to be presented with any offer on a foreclosure property.
On homes that are bank owned properties, I have found that each bank has a different proceedure for submitting offers and how they get processed. In some cases the offers go to the listing agent who in turn submits them to the bank's asset manager for review, in other cases, offers are submitted to an online processing that goes directly to the asset manager. Depending on the level of interest/demand for a particular property, the bank will then request that all parties that have submitted an offer, then provide the buyer's highest and best offer, as they usually do not provide a counter offer. If your offer is the on the bank looks to proceed with, you would then recieve a package of addenums to the contract that the seller requires to be sign, and then you would submit your earnest money deposit. Documents get sent back to the bank for their signature and once you have a fully exectued contract and addendums, you then proceed to getting your property inspections done, and if you are financing your purcahse you get your full loan process started. Through all of this, of course you realtor will be there to guide you on the steps needed and the timing of them. Good luck in your home search.