I rather like how Fire-Emblem portrays fantasy warfare.
You have the standard light-infantry, heavy-infantry (knights) and cavalry, alongside ranged units.
Then you have flying units that have niche roles- they can go practically anywhere, but as a result are often unsupported, they are weak to range, but have high resistance to magic.
Mages are simply trained in the use of spellbooks like soldiers are with spears. Their main role is as anti-armor, though they can get stupid powerful if you let them.
Dragons/Manaketes tend to have low movement, but high defense and attack giving them a useful, but not overpowering role.
And Clerics are typically in the rearguard helping keep your units topped up.