In private initially. If the pastor refuses to acknowledge the criticism it may be appropriate to take it to a gradually more public forum depending on the nature of it (e.g. making inappropriate comments to my wife is something I'd treat very differently to making a comment in a sermon that I didn't entirely agree with)
At my church I've never had reason to criticise the pastor. I've asked him to clarify a couple of things he's mentioned in sermons, but in a context of "how would you reconcile your point about X with these other Scriptures?" rather than "how can you possibly think X?". They led to a discussion over email (he's always open to talk in person but I knew he was busy at the time, and it wasn't anything that needed his time Right Now).
It's not necessarily a perfect match but the process in Matthew 18 about talking privately to a brother, then telling it to two or three, then telling it to the congregation, seems like a reasonable approach. It allows ample opportunity to correct something that needs to be corrected, while also giving the other person (pastor in your example) a fair chance to explain their side of things. Maybe the pastor is wrong, maybe it's a difference of opinion and nobody is inherently right or wrong, maybe the pastor was acting on information that isn't public (and maybe can't be made public).