Earnest money is the deposit a buyer hands over when an offer is accepted, as evidence they intend to close. It is typically held by a neutral third party — a title company, escrow agent, or attorney — rather than the seller, and at closing it is credited toward the down payment and closing costs. The amount is negotiated and varies by market and by how competitive the deal is.
What makes earnest money interesting is what happens when a deal falls apart. If the buyer backs out under a contingency written into the contract — inspection, financing, or appraisal, most commonly — the deposit usually comes back. If the buyer walks without a contractual reason, the seller may keep it. That is why the contingencies and deadlines in the purchase contract matter as much as the deposit amount: they define exactly when your money is at risk.