Simply put, earnest money is a personal check that you write (payable to your real estate broker or another third party) that accompanies your offer on a property to indicate to the seller that you are sincere, or "earnest," in your endeavor to buy their property. It's a "good faith deposit" on the property. Once you agree to terms, the seller will be removing their property from the market and passing up potential future offers, so it's only fair that they have something more tangible than your signature to rely on. It's a buyer's way of putting "skin in the game."
The check gets cashed upon contract ratification, and the deposit is held by that third party until settlement, at which time it is applied to your downpayment or closing costs. In the event of any overage, it's refunded to you at settlement. In the event of a default by the buyer, the seller theoretically can claim that deposit (though in reality it's extremely difficult to make that happen.) Here's a great FAQ from the mailbag:
DEAR BOB: What is the normal earnest money deposit that should be offered by a buyer for a $350,000 condominium? Is it a percentage of the sales price, or is it based on something else? -- Ottilia C.
DEAR OTTILIA: There is no "normal" earnest money or good-faith deposit for the purchase of a residence. At a minimum, however, it should be 1 percent of the sales price to show serious intent. That would be $3,500 in your situation.
If you are making an offer substantially below the seller's asking price, a larger deposit can impress the seller. However, your deposit should not be more than 5 percent of the purchase price. Always make your check payable to the firm you want to handle the closing of the sale, such as a title-escrow company or perhaps a real estate lawyer -- not the seller.
Of course this column is syndicated nationwide, so may not represent the typical transaction in this area. Though there is no specific requirement, in my experience and in the current buyer's market, you should be prepared to put about $5000 as a deposit for a transaction value up to about $350K, $10,000 up to about $600K, and for anything higher than that $20-25K would likely be considered sufficient. Obviously the more you put down, the more seriously your offer will be considered, particularly in a competitive bid situation (yes, they still happen!)