What does a title company do?

What does a title company do when your purchasing a park? Does the title company hold your down payment money and your contract that your seller and you agree and sign on to keep everyone honest? What if you walk away after due diligence will you get your money back from the title company if this is in the contract?