The various fees associated with buying or selling a home are called closing costs. Buyers and sellers both pay closing costs but who pays what costs varies from area to area. For example, in Los Angeles, sellers usually pay for title insurance. In San Francisco, it's customarily paid for by the buyer. Your real estate agent or mortgage broker can tell you which fees are customarily paid for by the buyer in your area and how much they'll cost.
Sellers can get an accounting of the closing costs they're likely to pay from their listing agent.
The most expensive closing cost a buyer pays is often the loan origination fee. Lenders charge points to originate a loan. One point is equal to one percent of the loan amount. This charge can be eliminated if you take a no-point loan. You'll pay a higher interest rate on a no-point loan, but you'll conserve cash.