You can teach your followers new spells via console commands on the PC version.
To do so, you will first need a hexcode for the spell you want to add.
To find out the hexcode, open up the console (by hitting the ~ key) and type in: help "SPELL NAME" 4 Where SPELL NAME is the name of the spell you want your follower to have.
For example, if you want your follower to be able to summon a Frost Atronach, type: help "conjure frost
atronach"
4 This will return several hexcode values.
The ones you're looking for start with the 4-letter string "SPEL".
In this specific case, there are 3 spells for Conjure Frost Atronach.
I'm pretty sure (but not 100% sure) that the spells are listed from least to most powerful.
The first hexcode listed for Conjure Frost Atronach is 000204C4 .
To give your follower this spell, target the follower with your mouse cursor while the console is open and type: addspell
000204C4
And voila, your follower now has the ability to summon a Frost Atronach.
gaming.stackexchange.com/users/16151/Mike H.
I have done a lot of testing on this and have yet to find a way for a companion to actually learn a spell.
If you give them staves that have spells on them they will spam them.
As long as they are not conjuration spells.
I used Lydia and when given conjuration staves she will revert to her bow and will not even equip the stave that summons.
I am also unable to unequip her bow and arrows.
They seem to be "Basic" companion items they always have.
So in short: No they cannot learn spells.
Although: If your companion is a spell caster they will cast the spells they already had but will not learn more.
gaming.stackexchange.com/users/15702/Nappa82
If playing on the PC, installing the mod, Ultimate Follower Overhaul , will allow you to get followers to learn new spells.
One of its features is: [To] make a follower use a spell tome from inventory to learn
a spell It also allows followers to "forget" their learned spells.
gaming.stackexchange.com/users/4797/galacticninja
Lydia will use magic staffs, although I've yet to teach any of my companions spells from a book.
gaming.stackexchange.com/users/16681/Angeli
You can add a spell to a NPC's spell arsenal, but your NPC will not use it, unless the specified NPC is programmed to.
It depents if your NPC really is a spellcaster.
If you teach a spell to a companion warrior, it will not equip/use it.
And equipping spells with equipitem is impossible.
gaming.stackexchange.com/users/22033/Rik
I haven't gotten it to work myself on a console yet either
(I play on ps3), though I've read elsewhere that on the Steam version they have filled their Hireling's inventory, then when telling them to interact with the book, the only option they have is read.
gaming.stackexchange.com/users/8767/Paul
Lydia is not a spell caster.
You should try the 3 students at the Mage College.
gaming.stackexchange.com/users/14868/Precog DragonBorn
I'm not sure if the actual companions can conjure with battle staves, but i know that one of the girls in the College of Winterhold can summon both fire and ice atronaches.
Also, if you have at least 90 Conjuration, you could put a Conjuration staff onto a body (preferably one with all the armour still on) and then use Dead Thrall on it.
They can summon out of that staff as long as it is in inventory but if it is not, just kill it and then put staff in and then resummon.
They will use whatever is in their inventory so you can make it if you want
so they are just spellcasters with staves
and I really recommend this since if you do this, you can have 4 summons for the price of two.
gaming.stackexchange.com/users/31012/adam
More  than  once , I've seen it mentioned that followers can be taught new spells by commanding them to interact with a spellbook.  I've tried teaching a few spells to  ol' Lydders , but she simply picks the books up and places them in her inventory.  What am I doing wrong?
How can I teach new spells to a follower?
gaming.stackexchange.com
<the-elder-scrolls-5-skyrim>
gaming.stackexchange.com/questions/38010
gaming.stackexchange.com/users/1980/Ben Blank
You can teach followers new spells via console commands. Try installing Ultimate Follower Overhaul. It seems that it is impossible to teach new spells to companions, without using exploits.
The community stresses out the requirement of mods and commands.