Now, we all know that fantasy is all about 100% imagination. If you think it, you can make it happen in a fantasy world. The same applies for magic. You think it up, it goes into the story, viola! No research, no factual framework needed, right? Anything goes.
You will hear classical fantasy readers and writers talk about the cost of magic, which by right is an unspoken rule. What, so I pay 5$ per spell? Huh? Nope, what they are talking about is generally speaking a give and take relationship with the magic. The cost can be almost anything to be honest (I'm waiting to see who can come up with a story that does cost the magic bearer actual cash btw), but often involves a personal exchange with the bearer/caster. This exchange of bearer/caster pays X and gets Z magic is very very common, but is often subtle or not important to the plot and goals so it is left as a side thread and ignored. In some books the cost of magic is so high that it nearly relegates its use to myth and legend. (The Elfstones of Shannara comes to mind, though I haven't read it in a looong time).
My take on the rules of magic are a little sideways. There is no hard and fast rule for magic, yet the rules are almost required. Yeah, rules and I don't get along. That being said, I am not a fan of having a lack of rules turning something beautiful into something cringe-and-eye-roll worthy. So I turned the cost rule on its head in my books and made a single rule that affects all of the magic users. The twist is that the rule affects who they are, not what they cast or use as magic.
In my Immortals series, the Immortals were created by gods who needed soldiers to save their world. What these soldiers found out the hard way was that the spell was imperfect and crude. Yes they had powers and could use them at will, but their Immortality was only for their soul, not their physical body. So they died, often, and reincarnated into a new body, and kept going. And going.
The cost here? An unending parade of faces in the mirror. An unending parade of relationships lost and never found again. That is a basic summary of the cost of magic in my fantasy world, the details are, of course, more finely tuned than that. The key is consistency.
What is your take on rules in fantasy magic? How do you apply them? Why?