A post on the official blog tells us more about the "Magic Guilds" (sic.) and for older players, the info should be quite familiar. As in previous instalments of the series, you will be able to build it into (4) levels, each level teaching you more spells:

"Each level of the magic guild grants four spells, plus another per level if an Arcane Library has been built. Which means a total of 16 spells for a fully upgraded magic guild in any town, and 20 for an Academy town."

Simply visiting a town will automatically teach the hero more spells. Logically, you cannot get all types of magic from any given town; some towns are incompatible with certain magic and refuses to teach them.

Read more here.