When you say "pre-foreclosure" what do you mean exactly? How do you know it's a "pre-foreclosure"? Is the home listed for sale, as a "Short Sale"? Or do you just see a home that's been vacated, and likely going into foreclosure??
If you're interested in buying ANY home -- a "pre-foreclosure" or not -- you need to talk to a REALTOR, who will represent you as a Buyer's Agent. He/she can get you into the home to see it, will do a market analysis to determine what fair market value is, and write up the contract. Then once it's accepted, he/she will get you through the entire transaction process including title, inspection, appraisal, loan approval, etc.
But if you just see a vacated home, that's not listed for sale, and you "think" it's going into foreclosure, there's really nothing you can do. The bank will foreclose on it eventually (which can take months...or even a year). Then, if it doesn't get bought at auction buy an investor, then it will likely come on the market, listed with a Realtor who represents the bank.