I'm in the United States. I honestly don't fully understand the nuances of it myself. When I applied for my passport I did so at a post office. But you got me curious so I did a quick search and looks like they can be at clerk's offices, libraries, city halls, courthouses. So depends on where you are I guess.
I landed on doing it this way because I found an online renewal option on https://www.usa.gov/passport which sounded convenient so I followed that process and after filling out the form it had me print it out and instructed me to mail the form, my current passport, and the processing fee. So I did.