The Warmage is a 3rd Edition D&D core class, originally printed in the Miniatures Handbook, but then carried over to more "general" use in the 3.5 Complete Arcane book.
The background is that, unlike Wizards (who spend a lot of time researching magic and collating data into dusty tomes) or Sorcerers (who wield magic instinctively), the Warmage practices over and over in state-sponsored military academies until the spells become almost like muscle memory for those who drill physically. They can recall spells by rote and training, rather than "feel" or "understanding".
This class behaves like a Sorcerer variant, but with extra amounts of ass-kicking. Its BAB, saving throws, and spells per day are the same as a sorcerer. Also like a sorcerer, charisma determines its bonus spells per day, the maximum level of spells it can know, and the difficulty class of saving throws against its spells. Unlike a sorcerer, its hit die is a d6 instead of a d4, it can wear medium armor without suffering any arcane spell failure chance, and it gets some neat and unique bonus feats. In a VERY interesting tradeoff, it also chucks the Sorcerer's "spells known" chart in the garbage, and instead knows its ENTIRE spell list, which is a hell of a lot more generous than the "spells known" chart, but more restrictive than the sorcerer/wizard spell list. To put things in perspective, at level four, a Sorcerer will know three level-1 spells and a single level-2 spell, while a warmage will know all ELEVEN of its level-1 spells and all NINE of its level-2 spells. Virtually all of their spells are direct-damage spells. Its most impressive advantage over a sorcerer, however, is that when it deals damage, it adds its intelligence modifier to the amount of damage dealt. A warmage with high scores in both charisma and intelligence is a walking engine of death and destruction that puts all other casters to shame, especially at low levels. By the way, in totally unrelated news, elderly dragonwrought kobolds get a free +3 to both charisma and intelligence, and they're available at LA +0.
This reliance on destructive spells is a legacy of its original purpose in the Miniature Handbook, where classes were designed for tabletop battles to be added to units of troops, and all it really needed to do was blast opponents away at range.
As the Warmage progresses they learn "Sudden" Metamagic feats, which means they can just add metamagic changes to spells without upping the level of the spell. Though it's only one-per-day, it's a nice enough touch if your group gets in a bind.
The class features do allow the Warmage to learn Wizard/Sorcerer spells not already on their list, but these are restricted to the Evocation School, and pretty much just add more flashy destruction spells. So if your group already has a versatility caster, then the Warmage becomes an excellent addition.
Warmage is tier 4, good at throwing damage at things and little else without optimization. Since you don't have to worry about working out their entire spells known or playing them all that intelligently, Warmage makes a good NPC class.
Making it Work
Admittedly, while Warmages can do much of the things that Sorcerers can do, the main difference between them is that Warmages are much more focused on wrecking things and are simply better at it. Good prestige class options are those that expand the available selection of spells, giving them more versatility.
The Rainbow Servant prestige class is particularly awesome. The 10th level of RS grants a character access to the Cleric spell list. This was meant to be built on top of a sorcerer or bard, who would still be limited by their "spells known" chart, or a wizard, who would still be limited by their spellbook. When built on top of a Warmage, however, it just dumps the entire goddamn cleric spell list directly into the character's brain, allowing them to spontaneously cast from it like a Favored Soul hopped up on methamphetamine and Viagra. A build including starting levels of Warmage and Rainbow Servant has the awesome nickname of RAINBOW WARSNAKE.
For the less cheesy, Bloodline feats from Dragon Compendium plus Runestaffs and the Raiment of the Four from Magic Item Compendium help improve their casting options.
5th Edition Strikes Again
Much like how the Favored Soul was reimagined as a possible Sorcerer subclass, 5e brought back the Warmage as a new archetype for the Wizard - which actually makes a lot of sense, seeing as how there's no longer a difference in casting methodologies between sorcerers & wizards and, well, the Warmage's old fluff about being a rigorously trained arcanist better meshes with the wizard's fluff anyway. In contrast to the Evoker, who perfectly fits the old Warmage's focus on crushing foes under barrages of arcane artillery, the 5e Warmage is more of a tanky and tactical wizard, with features bolstering their defenses and some tactical options. They're themed as "dual-school casters", focused on blending the magics of abjuration and evocation; they're not as good at one field as an Abjurer or an Evoker, but they are more versatile.
Originally, the War Magic Tradition appeared in a March 2017 release of Unearthed Arcana, but they made the jump to being official in Xanathar's Guide to Everything.
At level 2, they pick up two features at the same time. Arcane Deflection lets them burn a reaction to getting hit or failing a saving throw by immediately adding +2 to AC or +4 to their check result, which can potentially nullify the failure. The downside to doing this is that it drains magical energy, preventing you from using anything stronger than a Cantrip until the end of your next turn. Tactical Wit, meanwhile, allows them to add their INT modifier to initiative rolls.
At level 6, they gain the Power Surge feature, which is the most heavily changed feature from their original depiction in Unearthed Arcana. Now, every warmage can store a number of Power Surges equal to their Intelligence modifier (minimum of 1) - that said, they can only gain 1 Power Surge per short rest, and completing a long rest resets their Power Surges to 1 even if their INT modifier is higher than that, which is pretty stupid. They gain a Power Surge whenever they successfully use Dispel Magic or Counterspell, so long as they haven't filled up their storage. A warmage can burn a Power Surge when dealing damage with a wizard spell to add bonus Force type damage to the attack, with the amount inflicted being equal to half the warmage's wizard level. [NOTE: you'll deal far more damage if you take the slot needed for dispel magic or counterspell and use it to simply cast a damaging spell instead, so this feature should be treated as a simple bonus for situations where you would've cast dispel magic or counterspell anyway rather than an incentive to go out of your way to cast those spells.]
At level 10, they gain the Durable Magic feature, which makes Concentration spells more viable: whilst concentrating, they gain a +2 bonus to AC and to all saving throws.
Finally, at level 14, they gain the Deflecting Shroud, which pumps up their Arcane Deflection. Now, whenever they do it, up to 3 enemies they designate within a 60ft radius also take Force damage equal to half the Warmage's level.