The following is a description of how the complaints process works. It didn't always work this way, it has sort of evolved over time and hasn't been on paper until now.
1. First of all, forum mods have absolute power over their forums. They're sort of like mini-dictators. There are some exceptions, for example they cannot allow infractions of site-wide rules (see the Site Rules file) and certain forums may have certain rules in place regardless of who's in charge of them.
For example, nonsensical posts are always allowed in pointless and controversial opinions are always allowed in debate forums.
2. If a user feels they've been treated unfairly, they can complain about it here. It's Very Important that they cite specific posts or issues, especially if there's a general moderation bias against them. The citations allow the admins to research the issue and come to a fair decision, rather than relying on "oh he's cool" or "he's been a real pain in the ass before".
3. Admins can then gauge the situation and determine whether the mod or the reg is in the right. This is easier if other regs are involved in the discussion and support a specific side.
4. If the admins judge that the mod was out of line, the decision they make is reversed, and suspension/firing of the mod may be necessary in extreme situations.
5. If #4 happens, the mod can then contest the decision in the mod forum. At this point, the entire staff will discuss the issue until a clear consensus is reached. Whatever that consensus is is the final decision.
I can also step in at any point in the process. Unless I'm actively making a decision (and I say that it's my decision), my opinions should be treated as that of a normal admin rather than as an absolute authority. The difference between my opinions and my final decision should be pretty obvious.