First, why a foreclosed home? Do you believe they will be better deals? Some are, many are not, it just depends on the home the motivation of the seller, the activity in your market.
To answer, if you have cash and a willingness to take great chances with it, you can buy foreclosures at the sheriffs auction. You'll be competing with professional investors, builders and flippers who have much more experience than you do and won't mind allowing you to overpay.
You can buy a pre-foreclosure also known as a short sale. There are fewer of these than there used to be, but they still exist. The process allows you to preview the homes as they are listed with agents, you don't get to preview sheriff sales. The short sale process also takes anywhere from 3 to 12 months from start to finish and there is no guarantee your offer will ever be approved or if it is for the amount you offered.
Finally, after a home goes through the sheriffs auction, if an acceptable bid isn't made the bank retains ownership and they will eventually list the home with an agent. These homes range from terrible condition to okay condition and banks try not to do any work. The savings you may get from buying one may be lost in repairs and updates you will want to do.
So, that is it in a nutshell, oh yeah, the prices you see here on Foreclosures are more often wrong than right. If they are listed by Realtytrac they are not based on a what the home will sell for, so ignore that. Any great local agent can find foreclosures for you if you want to for free, without a subscription.