The bundle of fees associated with the buying or selling of a home are called closing costs. Certain fees are automatically assigned to either the buyer or the seller; other costs are either negotiable or dictated by local custom.
Buyer closing costs
Seller closing costs
Negotiating Closing Costs
Likewise, a buyer may want to save on up-front expenditures, and so agree to pay the seller's full asking price in return for the seller paying all the allowable closing costs. There's no right or wrong way to negotiate closing costs; just be sure all the terms are written down on the purchase agreement.
Thus, if a house is sold in June, the sellers will have lived in the house for half the year, but the bill for the taxes won't come due until the following year! To make this situation more equitable, the taxes are prorated. In this example, the sellers will credit the buyers for half the taxes at closing.