Earnest Money
Earnest money is a deposit a buyer puts down after the seller accepts an offer, to show the buyer means to close. A neutral party holds it until closing, when it counts toward what the buyer owes, or until the contract ends and the funds are released under its terms.
The amount is negotiated and written into the purchase contract, and whether earnest money is required depends on that contract too. On a $500,000 home, 1% is $5,000 and 2% is $10,000. The earnest money calculator does that math for any price and percentage. The FAQ has a short answer on what earnest money is and why it is called earnest money.
The money is not a fee. At closing it is credited to the buyer and reduces the cash they bring. If the deal falls apart, the contract decides who gets it: a buyer who cancels under a valid contingency usually gets it back, while one who simply walks away may lose it. When earnest money is refundable covers the details.