I am not a terribly wise person. I know it. My players know it. Sometimes I make rulings they object to. Sometimes I sense these objections are made because the player is unhappy with an outcome unfavorable to his character and figures "what the heck, maybe I can get him to change his mind." Other times I sense that maybe they have a point and I made a bad call. If the consensus is that it was a really bad call, I will reverse it on the spot. If it's merely questionable or can be rationalized more than one way (I.E. my way and their way), I ask that they play along and we'll discuss it after the session.
The best way to deal with a player challenging your ruling is to note the disposition of the group. Is only one player objecting? More than one? The whole group? If the player group in general is objecting, perhaps you erred in judgement. No harm, no foul, reverse it and move on. If one vocal player is objecting - and no one else - and you feel you made the right call, stand your ground. Discuss it with him after the game.
In the last session I ran, I made a couple of snafus that resulted in some disgruntled players. I also had a player gripe because I wouldn't let him keep a good roll that was irrelevant to the situation. After the session we discussed things:
- We discovered that both disgruntled player and DM had misunderstood the rules governing commanding/rebuking animals. No harm, no foul, we understand the rules now and are on the same page to boot.
- As as result of the command/rebuke snafu, the fighter's player lost out on a couple of actions he'd have made differently. He was initially disgruntled, but after discussing it we agreed that either way his actions would have had little effect on the situation's outcome, thus rendering the gripe moot. I did apologize anyway.
- The monk's player had been rolling poorly all night and became upset when I told him to roll something. He rolled well, then I changed my mind and told him that the check I had him make didn't matter. It didn't, I had misunderstood his intent. He asked if he could keep the roll for his next action in the combat round, which was several minutes away. I told him no, he got mad. After the session he pressed his case, but I stood firm; I was sorry he'd rolled porrly all night, but you can't "save" rolls for later use. After all, if he'd have rolled poorly he wouldn't have said anything about keeping it

I have found that asking the players to save their gripes until after the session results in cooler heads, since the immediacy of the situation has gone by. Also, minor gripes are forgotten, and legitimate gripes can be discussed maturely by all participants, at length, until a solution is achieved. Be fair, but don't be afraid to stand up for yourself as DM. Your game, your rules. Don't let disgruntled players boss you around.
