Highly variable mostly due to what the lender wants. Your lender must give you a good faith estimate of the costs involved.
Generally you will need to pay:
1. Loan discount (pre paid interest) and originatio fee on the loan (that's advertised with the rate).
2. Fees for credit report, appraisals, surveys, etc.. (if not paid in advance)
3. Preepayments for a years worth of costs for things like:
Property Tax
Fire Insurance
PMI
4. Prorated utilites and taxes already paid for the seller that cover time after the closing date
5. Payment to the settlement agent, title search fee, and lenders title insurance
6. Owners title insurance (not specificaly required but I would recommend NEVER doing with out it).
7. Various tax and recording fees.
8. Junk fees your lender invents to maximize their proper
An example of a NJ settlement HUD-1 is shown here:
http://www.mbh.com/library/downloads/MBH_HUD1.pdf
Essentially your closing costs (money you bring to the table) are the stuff that says PAID BY BORROWER, less that which the bank provides in the financing.