In a traditional tabletop role-playing game such as Dungeons & Dragons, an NPC is a fictional character portrayed by the gamemaster. If player characters form the narrative's protagonists, non-player characters can be thought of as the "supporting cast" or "extras" of a roleplaying narrative. Non-player characters populate the fictional world of the game, and can fill any role not occupied by a player character (PC). Non-player characters might be allies, bystanders or competitors to the PCs. NPCs can also be traders that trade currency for things such as equipment or gear. NPCs thus vary in their level of detail. Some may be only a brief description ("You see a man in a corner of the tavern"), while others may have complete game statistics and backstories of their own.
There is some debate about how much work a gamemaster should put into an important NPC's statistics; some players prefer to have every NPC completely defined with stats, skills, and gear, while others define only what is immediately necessary and fill in the rest as the game proceeds. There is also some discussion as to just how important fully defined NPCs are in any given RPG, but it is general consensus that the more "real" the NPCs feel, the more fun players will have interacting with them in character.
In some games and in some circumstances, a player who is without a player character of their own can temporarily take control of an NPC. Reasons for this vary, but often arise from the player not maintaining a PC within the group and playing the NPC for a session or from the player's PC being unable to act for some time (for example, because they are injured or in another location). Although these characters are still designed and normally controlled by the gamemaster, when players are given the opportunity to temporarily control these non-player characters it gives them another perspective on the plot of the game. Some systems, such as Nobilis, encourage this in their rules.
In less traditional RPGs, narrative control is less strictly separated between gamemaster and players. In this case, the line between PC and NPC can be vague.
Many game systems have rules for characters sustaining positive allies in the form of NPC followers; hired hands, or other dependent stature to the PC. Characters may sometimes help in the design, recruitment, or development of NPCs.
In the Champions game (and related games using the Hero System), a character may have a DNPC, or "dependent non-player character". This is a character controlled by the GM, but for which the player character is responsible in some way, and who may be put in harm's way by the PC's choices.