In order to increase the variety of magic in our era, we've chaned the system of upgrades for mages, dark adepts and shamans.
While mage of 1st level looking like ordinary unit, but with each levelup he or she gains 1 additional spell - and he or she still upgrades to new unit type. So, every mage has two types of spells - basic spells, which all unit of such type have (like fireball for red mage and his upgrades) and modular spells, which individual unit can choose from a spellbook (he has 3 or 4 variants to choose).
Spell aren't necessarily new attacks - ir may be abilities or bonuses for previously obtained attacks. Sometimes (especially for 4th level) list of available spells depends from spells you've chosen before.
Let's try to sort it out at an example of Royal Army Mages.
1st level
Apprentice Mage has only one spell -
energy stream with 10-2 arcane ''magical'' damage. Damage of the spell increases by 2 points per unit's level.
White Mage has the same spell (which inflicts 12-2 damage since white mage's level is 2), but also
heal (spell-ability which heals 8 hitpoints of adajenct units and cures poison and bleeding. Healing powers increases by 2 per level) and one modular spell of this:

1 -
lightbeam is new attack which replaces
energy stream. Inflicts 8-3 arcane damage, so total damage is the same 24 points as for
energy stream, but instead of ''magical'' special it has far superior ''unavoidable'' (90% accuracy) - it has speed of light, after all. Damage increases by 3 points per unit's level (so in 3rd level it would inflict 11-3 against 14-2 of
energy stream).
2 -
purification is new melee attack, which works against undead only (0 damage against non-undead units). Inflicts 7-3 arcane damage, so it's make your mage over-effective against any undeads, especially against ghosts with their low HP. +2 damage points per level.
3 -
style of willow isn't a spell, but rather an martial art of white mages. Unit, who learn it, able to fight with magic staff in the right hand and morning star in the left (do you remember Gandalf with staff and sword from 3rd LoTR film?). So, staff melee attack (which inflicts 7-2 impact damage) replaces with staff-and-morning-star attack (12-2 impact damage). Maybe good against enemy mages (who are vulnerable for physical attacks and usually can't fight back at melee combat).
4 -
relic is possibility to become a holder of the holy relic, but mage should abandon all his attacks forever. So, he loses his melee attack and ranged attack and even possibility to obtain new spells in the next level. In return, mage becomes invulnerable to any non-arcane damage, obtains ability to inflict 4 points of damage to all adjacent undead units every turn and ability to increase damage of adjacent lawful and neutral mages by 20% (like leadership but for mages only). And he or she is still able to heal allies, so you have neraly-immortal healer and leader without any damage. Not so bad!
3rd level
Light Mage has all spells which he had on 2nd level (which power of spells increased respectively), and can choose one of this:

1 -
Magical Shield is ability which increases cold, fire and arcance resistance by 25% (in defense only). BTW, Paladins have it as their basic spell.
2 -
Light Aura is default era's
illuminates ability.
3 -
Seer is ability to foresee the future. To obtain it mage should completely abandon any other magic, so he or she loses all spells and even ability to cure(but keeps attacks of staff or staff-and-morning-star). In return, mage obtains ''seer'' special (Unit:+20% accuracy Opponent:-20% accuracy) for its melee attack and 50-hexes vision range - you'll see everything! Especially good with
style of willow (14-2 damage of 3rd level).
4 - mages who have lightbeam can also learn
sunlight - new attack which replaces
lightbeam. Inflicts 12-3 arcane damage (while
lightbeam inflicts 11-3 on 3rd level), which specials ''unavoidable'' (90% accuracy) and ''flash'' (opponent's accuracy decreases by 20). One of most effective spells, which allows you to attack without receiving counterattacks and make it very hard for enemy archers and even mages(70% accuracy of magical attacks turning into 50%) to attack your mage.
Note: mages who have holy relic can't obtain any new spells.
So, it's how it works. Considering that apprentice mage have 3 variants of upgrade (red, blue and white mages) and each of 2nd level mages have 2 variants of upgrade, you have almost inexhaustible number of combinations of attacks and abilities. Find the desired combination and obtain ultimate spell on 4th level (there are also some secret spells, which aren't documented in unit descriptions).