NPC
A Non Player Character is a character under the control of the GM. They are there to provide backstory to a campaign, and to advance the plot or to un-snag narrative hooks. The role of the NPC is essentially to provide and infuse life to the game, so the Players have an avenue to suspend their disbelief (and ignore the fact that they are just a horde of sweaty guys in a basement with a bunch of dice). A world full of NPCs who are played well can lend credence to the reality of the world.
Sadly, this doesn't always happen, and the noble NPC is abused by many a DM who either doesn't know any better, or is a raging prick.
Types of NPCs
Inhabitant
These NPCs act as normal people would. Going about daily lives, maybe interacting with the characters, maybe not. They aren't spectacular in any way, but they're realistic. This is a Good NPC.
Quest Dispenser
Idiot cousin to the Inhabitant, this NPC waits around all day with their problem. They always have a problem, big or small, and they always just happen to be waiting for some strapping young lads like your party to help them out. Little personality, totally helpless, and entirely necessary to begin or continue the plot as the DM has it laid out. This is a Crap NPC, but with a little work and imagination a good DM can turn them into a Good NPC.
Lackey
A dumb NPC that's there simply to take direction from the PCs. No free will to speak of, and is often used as a meat shield when danger arises. This is a Crap NPC. However, they make up your rank-and-file soldiers in the armies of the Player Characters and the villains when campaigns become campaigns, so they tend to be more acceptable then some of the other types below.
Hireling
Similar to a Lackey, but a bit smarter. They get surly and won't interpose themselves between the PCs and danger willingly. This is a Good NPC.
Vend-O-Mat
Usually a cleric, these NPCs act as mobile vending machines, dispensing healing spells or buffs at the push of a button. They usually have no personality. This is a Bad NPC.
Psychopath
Fucked up for no reason. Brilliant in conversation, stupid in action. Exist solely to add 'flavor' to a DM campaign. Once in a blue moon, this NPC is tolerable. As a regular, he shifts from Crap NPC to Bad NPC. The archetype is given a free pass if they are player characters, though.
DMPC
The DM really wanted to play, and so made a character up. Only now, he's in control, so things tend to go the NPCs way. He will often be min-maxed, but arbitrarily so, as the abilities seem to change with the encounters as they require. This is a Bad NPC - unless he knows how to stay out of the way for most of the time, which usually doesn't happen. Gandalf is often accused of being the only Good DMPC.
Gary-Stu/Mary-Sue DMPC
As above, but with features that resemble the DM or his girlfriend. This is what the DM wants to be in his fantasy. There usually is a wall-o-text dialog from the NPC explaining his backstory, even if you just asked him for directions to a brothel. This is a Horrendously Bad NPC, and players are advised to be as subtle as possible in the execution of him or her, so the DM will only see what you did there after it has been done. And trust us, you will ALL want to kill this NPC.