Gentlemen, I love NPCs. No, I really love NPCs. They're the best thing for a GM to use to take part in his own game. I love it when I'm interacting with them in a meaningful way as a PC, and I love when I'm the GM with an NPC the players can interact with in a meaningful way. They allow a GM to play in his game, aside from combat mooks, the Big Bad, and the various merchants your players will want to visit. However, not every situation requires an NPC, and the players don't always want to have one following them around. As well, you must be careful, because while NPCs should be useful, they should not be so useful the players never need to do anything.
You want to avoid having them stick with the party too long, or atleast actively participate in battle and skill checks, as that would have them run the risk of usurping the party's spotlight, even accidentally. The exception to this is when their specific purpose is to fill a gap in the party's build. You don't want to give them undue favor. If the NPC will die, or the players themselves are plotting against the NPC, let it happen. No NPC that travels at the mercy of the players should be plot important, not unless you want to see what the true mercy of your players turns out to be. Not to saying they can't be in that situation, but if the princess is key to the story, and she's travelling with the players, atleast one person will try something. Usually marrying her, but worse could happen.
You also don't want them to be useless and insignificant. You want the players to like having them around, and to want to keep in their favor. If the king never helps them out, why would they not want to put his brother on the throne? And the same goes for any lower power NPC. Typically, their ability to take an NPC seriously depends on how useful he is to them. Don't make them protect NPCs too weak to defend themselves, and don't make them have to always bail a dude out of a jam with little to no reward.
Also, they should have real lives. NPCs are people in a living, breathing world. The king, the merchant heir, the leader of the guard, whoever they are, they should not be around all the time when the players need them. This is how you get the players to do what you want, by the way. You don't force them, but say they need to see the guard leader right now for one of their personal goals, sure. But, they gotta do him a favor first, and then you guide them into a plot point. It's a little heavy handed, but it works. Generally, keeps them useful, and lets the players know this by having more on his plate than just them.
Now, the important thing to realize is that none of the above applies one hundred percent of the time. Some people like doing favors for the useless NPC as it makes them feel like a hero of the people. Others like having along a weaker, or stronger, NPC either to be someone's hero to have a hero to worship. It is impossible to know how a PC will react to an NPC. As an example, one time in a Dark Heresy game, I took a liking to this guy that was showing my acolyte around. Now, the guy turned out to be in on the Heresy, which made me sad becuase everything I found out proved that the city we were in needed to be given an orbital bombardment suppository, and I was gonna save him from it. Yeah, needless to say, someone didn't get to ride away as their city was destroyed. The GM was shocked that I wanted to save the guy, but it did all happen kinda fast.
Edit: Speaking of NPCs, if anyone wants to be included as an NPC in my games, gimme a brief summary of the character, and I'll work the magic.