Closing costs are often just mentioned in passing as part of the home purchase process, but they can be substantial and you shouldn't ignore them when budgeting. Click through to understand what exactly closing costs are.

The term "closing costs" usually includes a wide range of fees necessary when you're purchasing a house: fees for an attorney, a title search, title insurance, taxes, lender costs and homeowners insurance. The amount you'll pay in closing costs often averages 2% to 5% of the purchase price, based on the size of the loan and local taxes and fees.

If you're buying a home, your loan estimate should include an estimate of closing costs. Shortly before your closing, you should receive your closing disclosure, a document that provides final details about your loan and your closing costs. These costs may include the following:

Lender fees. Some lenders wrap all their costs into an origination fee, while others break them out into a list of such things as courier fees, appraisal costs, administrative fees, processing fees, a credit check, transfer taxes, a flood certification if one is required, and underwriting fees.

An optional closing cost is a discount point that is about 1% of the loan amount. Discount points can be used to lower your interest rate. Consult with your lender to discuss the pros and cons of paying discount points. If you're cash-poor, you're less likely to want to pay extra upfront to bring down your interest rate.

Title fees. About 70% of closing costs are title-related, so shop for title service if possible: title search, title insurance and settlement services. Settlement fees can vary by several hundred dollars from one company to another. To compare fees, make sure you understand what's covered, including a title search and courier fees.

Lenders require that you purchase title insurance — for your and the lender's protection. Suppose someone claims an ownership right to the home or says he or she hasn't been paid for work on the property and has a lien against it. Title insurance protects you if previous owners failed to pay taxes.

Prepaid costs. You may be required to set up an escrow or impound account to collect homeowners insurance and property taxes. If you make a down payment of 20% or more, you may be exempt.

At closing, you'll pay one year of homeowners insurance plus two months of premiums to be kept in reserve. You'll also be required to pay two to six months of property taxes, depending on when the tax bill is due. This can add thousands of dollars to closing.

You're not likely to avoid paying closing costs entirely, even though some of the costs can be negotiated with sellers who typically pay the real estate agent's commission. Some costs, like transfer taxes and property taxes, can't be changed, but you can ask sellers to raise the purchase price in exchange for a credit at the settlement table to cover closing costs. This lowers your out-of-pocket expenses. When it's a buyer's market, you can ask sellers to pay closing costs and not raise the price to cover them. You may request your lender to pay the closing costs. A slightly higher interest rate can be charged to recoup the money.

Be sure to keep in close communication with the real estate agent, your attorney and other financial professionals to be sure you understand what your costs are as you head toward closing date.