Location Agreements and Permits
You may not need a permit in every case. That is determined by the local governance. You should ALWAYS obtain a signed location agreement, however. This is a document that outlines all the details of the shoot and advises that the owner of the property is agreeing all images of said property may be used in accordance with the movie.
So back to the original question, the permit is typically obtained through the city in which you're filming. Check for a film commission first, otherwise mayor's office is the way to go. The price can be anything. I shot in a small town in eastern Washington, and the mayor closed Main St. for the entire afternoon for us to shoot and didn't ask for a dime. Local businesses let us stage there for free, so we had a local theater with full dressing rooms for HMW. Individual locations may charge a fee to shoot there which is to be negotiated with the owner.
On the other side, you shoot in L.A. and you MUST have a permit to shoot ANYWHERE within the city, even if it's your own home, and there are additional fees all over the place depending on the type of location it is. And people do get uppity about it - I know a producer who was arrested for having a three man crew inside a crew member's house, with limited talent and all trucks and cars within the driveway space, when the neighbor saw a couple lights go inside and called the cops. Some of that goes to good neighbor policy though - it's always a good idea to inform neighbors of shooting out of respect. There will be far fewer hiccups that way.
Happy filming!