The Warrior was one of several NPC Classes introduced in Dungeons & Dragons 3rd edition.
Unlike commoners, they generally have some ability to fight back if attacked, but they're even weaker than the fighter, since they don't get bonus feats. They aren't that much worse than Samurai or Swashbuckler though, which is more an insult to their weak class features than anything.
Typical warrior NPCs include guards, soldiers, local thugs or common people who have learned to fight in order to defend their home to a certain degree. A fallen Paladin is almost functionally identical to a Warrior.
The warrior returns in 5th edition as a sidekick class. Still just a weaker, simplified version of the fighter.
|Dungeons & Dragons 5th Edition Classes|
|Barbarian - Bard - Cleric - Druid - Fighter - Monk |
Paladin - Ranger - Rogue - Sorcerer - Warlock - Wizard
|Tasha's Cauldron of Everything:||Artificer - Expert - Spellcaster - Warrior|
|Van Richten's Guide to Ravenloft:||Apprentice - Disciple - Sneak - Squire|