Earnest money (sometimes called Good Faith Deposit) is the money you pay 1-3 days after the seller has accepted your offer. How much earnest money you pay varies, but it's typically 1-3% of the sale price of the home. In some areas, earnest money is a fixed amount.
You'll pay earnest money by cashier's check, personal check, or a wire transfer. Your earnest money will be deposited into an escrow account or by the listing agent. Once the sale of the home has been completed, the earnest money you paid will be applied toward your closing costs. If you back out of the sale due to a failed contingency (eg: inspection report), you can recover your earnest money in full. If you back out of the sale for reasons not covered by contingencies, you will forfeit your earnest money.
Before signing a purchase and sale agreement to buy a home, carefully review all contingencies to understand how much earnest money you'll pay and how to successfully recover your earnest money if you need to back out of the sale.