It's easier to look at an example I think.
Say you are buying a home for $100,000.
It will cost you about $3,500 in closing costs to get a loan for this home. Closing Costs are defined as COSTS/FEES associated with getting a loan.
What makes it so confusing is that FHA wants 3.5% down, which incidentally is about the average cost of closing costs (before the gallery gets too upset, I've seen closing costs be as high as 6%)
SIDEBAR! - Closing Costs - This can include your loan officers "commission," loan junk fees, insurance, attorney/title fees, mortgage insurance premium (an insurance you pay for the lender so if you fail to pay the get their money back, well most of it), and some other smaller fees.
OK BACK TO YOUR EXAMPLE, you buy a $100,000 PLUS you have about $3,500 in closing costs, so your total is $103,500. At the closing you'll be asked to bring about $3,500 for a DOWN PAYMENT. HOPEFULLY, your agent negotiated some closing costs, but if they didn't your loan amount would be about $100,000 in this example.... and depending on your situation, you might have to bring the full $3,500 down payment AND the $3,500 in closing costs.
As a note, the DOWN PAYMENT is supposed to be money that is your money "in the game." As in you bought a $100,000 home with $3,500 essentially. This is why real estate is the coolest investment in the world.