On the day your home purchase wraps up, as the buyer you'll be expected to pony up cash for various closing costs. These include transaction costs like loan setup fees, property inspections, the escrow or title company's fees, and more -- sometimes in the thousands of dollars. See www.bankrate.com for a state-by-state analysis of the loan portion of buyers' closing costs.
Closing costs also include what you owe for homeowners' insurance, mortgage insurance (or PMI, typically charged if you're putting less than 20% down), your share of that year's property taxes, and more. The total is usually around 2-3% of the house price, depending on what state you live in, what kind of mortgage you get, and more.
For legal advice, you'll need to talk to a lawyer.