AHJ stands for Authority Having Jurisdiction. It is the agency or official with the legal authority to interpret and enforce the codes that apply to a specific construction project. The AHJ is most often the local building department, but on a single project it can include multiple AHJs: building department, fire marshal, health department, AHJ for accessibility, AHJ for elevators, and so on.
The AHJ is the entity that approves drawings, issues permits, performs inspections, signs off on substantial completion, and issues the certificate of occupancy. Code interpretations vary between AHJs even within the same state, which is why experienced contractors confirm specific requirements with the AHJ before bidding rather than assuming.