How does the magic system work?
It varies a bit between editions, and the Mongoose version is quite different from other ones. I have the second edition of Mongoose, and there it works like this:
There are several different magic skills across different traditions. The most common is, well, Common Magic. In a setting like Glorantha, these are widely available and most people know common magic appropriate to their profession - a warrior will know Bladesharp or Bludgeon, a merchant will know Golden Tongue, and a hunter will know Bandit's Cloak. Common Magic is a skill, and casting spells costs Magic Points (of which you normally have an amount equal to your Power ability score).
The second type of magic is Divine Magic. In order to use Divine magic, you need to form a pact with a god, usually by joining that god's cult and dedicating part of your Power to that god. You will still have that Power, but it won't generate Magic points for you. Instead, you can have one Divine spell appropriate to the cult per point of dedicated Power. Casting a Divine spell uses the Lore (specific theology) skill, e.g. Lore (Thor) or Lore (Demeter). You also have a Pact skill that measures your connection to the god in question. This determines how
strong your spells are, and how easy it is for you to get them back. There is also a role-playing aspect in that a higher Pact skill is intended to make you act more like the god in question. Divine spells do not cost Magic points to cast - instead they are a bit like D&D spells in that once used they are gone and you have to regain them. The difficulty and time taken to do so depends on your rank within the cult - a mere initiate must return to a temple or shrine and roll a Pact roll once per day to regain them, whereas higher ranks get one attempt at recovery "in the field" and eventually shorten the time needed between attempts as well.
The third type is Sorcery. Sorcery is handle via two skills: Sorcery (specific grimoire) and Manipulation. Each grimoire has a number of spells in it, and the grimoire is usually not an object the PC themselves possesses - it is likely in the possession of some sorcery school/cult/master, and the PC has been allowed to study from it and learn its spells, but it does not belong to the PC. The game is a bit vague on how many spells are typically part of a grimoire, but about four to six centered on a common theme seems right. After gaining the Sorcery skill you need to spend some additional time learning the specific spells in the grimoire as well. The Sorcery skill is used for the actual casting, and the Manipulation skill isn't rolled, but is instead used to determine how much you can change the parameters of a Sorcery spell - when cast at their basic level, most spells are fairly weak but with appropriate manipulation they can instead become really powerful.
Finally, there is Spirit Magic. Unlike the other three types, Spirit magic doesn't use spells, but instead focuses on finding and either bargaining with or binding spirits for power. So if you have a bond with an ancestor spirit, you can call upon that ancestor's knowledge, and if you have a bond with a beast spirit you can gain aspects of that beast.
Old-school Runequest has the same types of magic, but handles them in different ways.