I personally have two approaches, a soft approach and a hard approach. If a player or coach has been moaning a bit, but not really done much wrong except moan, I'd approach him in a 'sympathetic' manner. Body language is important, make sure your arms are open and relaxed, but firm. Say something along the lines "If you have a problem, we can talk about it after the game/half time," or "it might have been a foul, I'm not saying it wasn't, but there were a lot of bodies in there/a player came across my view/I had a bad angle." Even if it never was a foul in a million years, it gets them on your side and makes them think you're looking out for the next one. Consider going to the player or meeting them halfway if you call them over, because then you're meeting on neutral terms. Also if need be, tell players you just "want a chat," and don't want to caution them (tap your pockets to show your cards are away), because if a player thinks he's being cautioned he might get some words in for his trouble anyways.
If a player or coach is mouthing off which is detrimental to your match control, then it's time to get tough and firm. If you need to, blow your whistle loud and call them over and make them come over to you. This alone helps take the heat out of the situation as they think "oh s***, I'm in trouble." From there on, your body language should be tense and firm, even defensive. Saying something along the lines of "you've been complaining about every decision, the throw in there (point to it), the foul over there (point again), and the offside (firm point). I will not tolerate any further dissent (move your hands downwards to indicate that it is literally the bottom line)." Don't be afraid to call the captain over if need be. If he continues, caution them or dismiss them from the technical area. If he walks away while talking to you, call him back. If he walks away while you're talking, his heads obviously gone because he isn't listening to the voice of reason, you: the referee.
It's important to find your own style, and see what works for you, but I find personally these two approaches typically work best. Just remember body language is very important. You don't want to appear overly rigid and dense for small infractions, likewise you don't want to appear "soft" if you're giving a player a talking to of a lifetime.