There are different ways of going about it.
Seller contribution can be put on top and included in the purchase price - in this case
the seller does not loose any money by contribution, and buyer wins buy getting their closing costs paid by the seller (instead of laying cash out at closing, which the buyer may or may not have).
Or, a seller can agree to pay the closing costs without them being added on top.
However, in certain types of loans, buyers get confused - and it's their MIP (in FHA loans) that
gets added on top.
Best way to find out what's what is by reading your contract, Good Faith Estimate from your lender,
and asking questions of your agent/mortgage pro.
You may want to ask questions like: "What is the best way for me and why?", "Which way saves me more money in a short/long run?" Once you get your answers - decide which way works best for you in your current situation.
Of course, in every negotiation seller and buyer have to agree on all terms.
Hope this helps,
Beachfront Realty, Inc.