People often ask me if I like writing fantasy for the freedom.
"What freedom?" I ask.
"The freedom," they say, "to do whatever you want."
At this point I either laugh or cry or pour myself a drink, because the presence of magic is not a carte blanche, a sudden permission to throw everything and the kitchen sink into a book. People who take it as such usually write sloppy stories. They might have a vivid imagination, but writing fantasy requires the mind of a technician as much as an artist.
That's because good fantasy, like all frameworks, requires RULES.
Everywhere you look, there are rules.
Everywhere you don't look, there are more.
Sometimes those rules are simple, and sometimes they are complex (and sometimes, imho, they are needless convoluted), but they are almost always there, and I'd wager, in most good books, they might not be on the page, but they're buried, in the foundation, creating a degree of cohesion you might not see, but will certainly feel. Worse though, is when you DON'T feel it. When the elements on the page feel random, or the appearance of a rule turns out to be nothing but that, an appearance, something set up only to be disrupted at the first issue of convenience (this is by far my largest pet peeve as a reader, when the rules become porous, dissolving and reforming as needed to suit the writer's whims).
My Shades of Magic series includes not one, but four parallel worlds, each with a different relationship to magic.
In Grey London, magic was forgotten.
In Red, it thrives.
In White, it's abused.
In Black, it killed.
In Red London, the relationship between man and magic is one of reverence, respect. They worship magic as a god, mind the checks and balances, do not take without giving back. They are stewards.
In White London, a fear of magic dominating man has led to the inverse, a situation in which man endeavors to dominate magic (and consequently precipitates his own destruction).
Breaking the systems down past context into base fibers, magic in my worlds is two parts nature, one part god. It abides the rules of the natural world, but is the common element in everything.
Rooting the nature of magic in, well, NATURE, means creating a fantastical system that in most ways adheres to a realistic one. Cycles of life, growth, power, action and consequence, energy neither created nor destroyed, the aspects of magic mirror those of the natural world at its most basic.
The goal is to make the rules flush with the surface of the world, and in so doing, to make it intuitive, believable. Every step we take away from reality requires a leap of faith on the part of the reader, and the fewer steps necessary, the less likely that one will trip, stumble, fall. Or worse, begin to disbelieve.
And that is the great risk of going off-book, of indulging in a system of whimsy, a place where anything is possible without reason or repercussion--the more you ask the reader to believe, the less they often will.
The converse tendency is to prove oneself and the sturdiness of one's world by putting it ALL on the page, in maddening detail, which can be just as problematic--sure, you've made a cohesive world, but if your rules distract from the actual story, few people are going to give a damn about the thoroughness of your systems.
When in doubt, I find it best to remember that the fundamental laws that govern a world are at their core simple, intuitive, and elegant. By applying those traits to any world, no matter how superficially fanciful, you ensure that most readers recognize the terms, and are game for the ride.