Down Payment On A House?

In the process of buying a house, when does the down payment change hands. Is it at the closing or earlier? Also, does the payment go to the title company?

Any help would be appreciated.
8 answers 8