A non-player character (NPC) is any character in a game that neither represents, nor is controlled by the player. The term originated in tabletop roleplaying games, where it was used to differentiate between the player characters, and those incidental characters controlled by the game master. It was later adopted into the lexicon of video gaming, to identify characters controlled by the computer or game software. In Star Trek gaming and roleplay, the term NPC can apply to starships, species, or any other encounterable entity as readily as to individual characters.
Depending on the game, not all NPCs are controlled directly by the GM. In many play-by-email games and similar online sims, players often create NPCs that they control for which their characters, and other player characters, can interact, the way any fiction writer will create other characters for their story's protagonist to encounter. These types of NPCs are sometimes referred to as Special NPCs or Personal NPCs, meaning that they "belong" to a certain player, and not the GM or the group at large. It is considered proper etiquette to ask permission of such a character's creator before another player uses that NPC in their own posts.