NPCs have a huge role in RPGs. Obviously the GM is known to be in charge of this wide cast of characters while the players worries about being the heroes and stars of the show. Some games gives players the ability to control a few of them as their back up or maybe followers, but I think that could just be the tip of the iceberg.
The Standard NPC
So this is your basic filler NPC. The shopkeepers and towns people that fill out the world. While at an time a towns person COULD pick up a stick and become an ally that isn't what they are right now. This is the NPC that will be in every game you,ll probably ever play (unless it's a heck of a lonely world) and really don't need to be controlled by anyone other than the GM.
How to get the players involved:
As I said most of your NPCs are just background flavor and set dressing. That doesn't mean they can't be interesting too. If one player wants too suck up table time shopping and haggle (Even better if two) then see if anyone at the table wants to be the shopkeeper. Slip them a note saying how much the item is worth, what they're willing to spend/sell it for and let them play it out. It stats and dice are needed you can either give the player the stats or just roll them yourself. Simply getting the other player or players, your can always have a family business after all) involved will keep everyone at te table more interested even if no one else is rolling dice.
The Ally NPC
The ally NPC is a little meatier than your standard commoner and I don't just mean stat wise. They are usually recurring characters if not constant figures in a game.
Games like D&D have had features like he Followers Feat and Savage Worlds has a who section dedicated to Ally Extras.
How to get the players involved:
This might be one of the easier ones, especially if the player invested some part of their character advancement to have allies. It's not uncommon to let players roll for these characters in the heat of battle, in fact I strongly suggest it as with more characters on the heroes side usually means bigger fights all around. Savage Worlds actually really opened my eyes on using this type of NPC and it's proven to be invaluable with a group that might be a man or two short to really stand up against a threat. A side trick I've found though actually involves less rolling with these characters in battle and actually shifting them to the background almost like standard NPCs. One of my biggest worries I walways had about my heroes getting large numbers of characters on their side was managing combat with so much going on. If you have five heroes and they got a group of sixteen guards to rally with them that's twenty one characters with twenty-one turns before the enemy even shows up and that is daunting. Then I realized, "Why do they all need turns? The heroes are the starts after all." When you have as many allies as you have players or less feel free to let everyone take control, but if you're dealing with more I say turn them into set dressing. Have fights with hoards of enemies letting the NPCs tackle the bulk of them all around the heroes while they can go after the bigger threats then come in after and help clean up whats left with who's left (These aren't other heroes after all and are a great way to show the deadliness of an enemy without actually killing a player)
The Fill In NPC
Now with the two more common NPC types covered I figured I'd round things off with a personally favorite of mine. These NPCs exist souly to get players involved at the table so there's no "How to get players involved?" section as that would be redundant. This is more or less the equivalent of the shopkeeper example I gave earlier, but on a larger scale. Sometimes the party gets separated. Last week in fact that happened to one of my groups as they were having down time in the city and the bard decided to perform as a local tavern. It just so happened that a jail break happened at that same time. All the other players were too busy trying to stop what was going on to go, find, and get him. This could mean one of my players sits and does nothing while everyone else has fun, but that feels like punishing a player for nothing (I did ask what people wanted to do with down time so they could b caught off guard by the escape). Instead once I knew he was definitely not going to end up in the fight I gave him the stat block for as town guard. They were in one of the city jails and guards while sparse that time of night were a round and able to help. This brought the player back to the table, just not as his character. Obviously I let him keep the XP as he did do the work. Everyone had fun and the guard even almost died because as it not being his hero the player was ok with taking more risks. I would definitely say this should be saved for times when you know the actually hero won't come into play and always use an NPC that would have just been background otherwise. If a player subs into the shoes of a recurring NPC it runs the risk of that just turning into a second character for that player. I'd also like to add that you should never make this mandatory. Ask if the player wants to run one of the guards, if they don't that's fine it just means they are now actively choosing to not be involved.
I hope this helps some of you get more out of your NPCs and maybe eve get your players even more invested in your games.