Here in New York it varies by city and county. In NYC, NYC has it's own inspectors which inspect your work and give the OK for the utility to energize the service.

In the suburbs where I do most of my work. My work is inspected by the New York Board or Fire Underwriters. Which is a private company, most towns, and smaller cities use the board in lieu of hiring their own inpectors.

A new house typically requires three inspections. A temp inspection, says that your service equipment is up to snuff and can be energized. Ten there's a rough inspection where your inside wiring is looked at and signed off before wall coverings (sheet rock) can go up. Then after you're done a final inspection will be done and a certificate issued. Most building departments require this certificate in order to issue a certificate of occupancy.

A typical house will cost me between $45 - $75 depending on how much stuff is in there. There are also filing fees at some towns which run $10 - $25 depending on the town, some towns let you deal directly with the underwriter, some don't.

The underwriters are usually very congenial to deal with, the inspectors are usually retired electricians or other contractors. And the certificates provide great leverage in getting paid that final check.