Is it possible that, when you flag a moderator's actions, they can action the flag themselves? Or does it get escalated even higher to staff? I suppose the question then is, who would deal with the staff's flags?
As BoltClock says in his answer, any moderator can handle any flag.
Obviously the classy thing for a mod to do is not handle any flags that concern their own actions.
If you really have reason to suspect that a moderator is abusing their position, you should contact
firstname.lastname@example.org for SO, or
email@example.com for the rest of the sites.
If you really have reason to suspect that staff are systematically treating you unfairly (which seems very very unlikely), I guess you could try to contact one of the bosses directly, say Joel on Twitter. But if it comes to that, make super sure your viewpoint in the matter doesn't contradict that of everyone else with a bit of common sense.
If you mean flagging a moderator's post, any moderator including the one whose post you flagged will be able to see and handle the flag. There is little difference, if any at all, between an employee and a community moderator when it comes to flag visibility and handling.
It's the responsibility of the moderator in question to avoid handling the flag themself, of course, but there are no technical rules preventing them from doing so. (I wouldn't want to be prevented from editing or deleting my own answer just because it was flagged.)
If you want to complain about a moderator, sending a mail to firstname.lastname@example.org is the best way to do that. Those mails will be handled by the community team, their job is to moderate the moderators.
While a moderator will usually avoid handling a flag about themselves, the other moderators on the site are also not the right people to handle problematic moderator behaviour, so mailing SE is still the best way.
Stack Overflow works with community moderators who are elected every year. You can see them on this page: https://stackoverflow.com/users?tab=moderators
However, SO also has privileges. As soon as someone has at least 10000 reputation, he can also handle some of the flags.
That said, this goes for every flag. There is no difference between flagging something from a mod and flagging something from a normal user. Of course, the chance that you'll ever have to flag a mod is extremely low, since they can only get to those positions by behaving very well.
Eventually there is no technical impairment for a mod to handle his own flag, they're just trusted not to go that far.