Do not forget that you are the gamemaster. You know the score, you know the campaign, the adventure, everything behind the curtains. Your players do not - it should be your goal to be their eyes and ears. Make sure they see the situation as you do or want them to do. Most of the time they are walking around in darkness, perceiving almost nothing and it would be a great help if you enlighten them as much as possible, as long as you do not reveal too much.
Have some surprises. Most of my players tend to realize some pattern in my gamemastering, so I try to change the pattern sometimes. Not completely, but try to be a bit unpredictable with your NPC and your adventures.
Always have some alternate option. My players and I hate nothing more than a dead end or a situation with only one possible solution.
Make sure the PC can die. Do not go out and kill them, but make them realize that they are not invincible. Most of the times, this makes players care a lot more about their PC, in my opinion. It creates drama. If a PC wants to do something quite stupid which can or would kill him, give him a hint. I always look a bit surprised and ask the player if he is sure that he wants his PC to do that. This is a pseudo-subtle hint which never was ignored, as far as I can remember.
Remember: perhaps they do not perceive the situation as you do. Their characters would realize a dangerous situation, their players might not realize it.
P.S.:
Be fair. If a player has a problem, do not make fun of him. (This is important: respect your players. But do not waste your time with players that do not respect you. (Unless you yourself are responsible for that. Then it is your duty to set things straight.)) Listen to him, try to solve the problem.
Listen to your players. Most if the time, they tell you indirectly and unconsciously, what they want and what they like - or do not like.
Some players are very spotlight-greedy - they try to have the attention most of the time. Not every player will tolerate it, not every player will stand up against those so-called attention-wh*res. In my opinion, it is the job of the gamemaster to give every player their spotlight-time. If nothing else helps, it is their duty to get rid of the attention-wh*re, if you ask me.