Whomever wants to build something. Without the permit a complaint can get all your work ripped out and redone and that cost is all you. Depends what your building and code vary from city to city.
Hope it helps
Lr
every city has rules for permits depending on the job to find out look at the city code.. Where I live I can build a 12x10 shed with out a permit but not a 12x11 due to code not more than 120sf of floor space. same goes for my deck as long as it isnt more than 30" off the ground I dont need a permit.. but if I want a 7 ft fence I need a permit.. Same goes for some remodel stuff If any electrical is done I need a permit or if plumbing is moved things like that so look into your city codes..
the homeowner can apply for and obtain the permit
or the contractor can apply for and obtain them
the contractor must show proof of insurance and licensing to do so