All spells are associated with a specific type of magic. Fireball is a fire spell, spark birth is a rift spell, and mirror image is a protection spell. To cast, say, fire spells reliably, you will need skill in both cast generic and cast fire. Your skill in cast fire will of course do nothing for your ability to use teleportation magic.
The type of spell also determines if a particular mastery or guild reputation bonus can benefit the spell. Mastery of arctic powers will do wonders for the cold spell ‘cold ray’, but it won’t do anything for the rift spell ‘rift pulse‘ even though both do cold damage.