One of the terms of the contract is that you will provide an earnest money deposit, or initial deposit, This amount (typically 3% of the purchase price) is held in escrow (the neutral third party that holds funds while the transaction is taking place). It is a part of your down payment money, so if you were putting 20% down on a home, at the close of escrow you would bring in 17% to complete that amount. This deposit will be returned to you if you cancel escrow while still in your contingency periods. If you cancel escrow once you have removed contingencies you are at risk of losing your deposit money to the seller. Of course, consult a real estate attorney about the ins and outs of this.
Next: The Closing Date