Laws on magic:
Nesbitian laws (as stated by Brian Attebery):
- What is wished for must be paid for. In a growing number of fantasies, this is written out in some form of “Magic has a price.”
- Every magical act sends ripples of consequences out to the ends of the world.
- Magic tends toward chaos unless checked by patterns of word or number.
Brandon Sanderson’s Laws of Magic:
- An author's ability to solve conflict with magic is DIRECTLY PROPORTIONAL to how well the reader understands said magic. (Sanderson uses this to delineate “hard” “soft” and “middle ground” magic, based on the level of explanation and understanding given to the reader in the text.)
- Limits > Powers, meaning that what limits a person’s powers makes that character more interesting than the possibly limitless powers would. Sanderson cites Superman’s weakness to Kryptonite as an example.
One of Larry Niven’s laws: It is easier to destroy than to create.
Niven’s reversal of one of Arthur C. Clarke’s Laws: Any sufficiently rigorously defined magic is indistinguishable from technology.
Basically, Magic has limits when wielded by characters, but is limitless in nature. All magic used by characters must have some cost and must have consequences, because magic operates within the laws of physics in that any world in which magic operates includes in its physical laws the laws that dictate magic. Magic will tend, like any power in a fallen universe, to corrupt and go haywire; magic is like any other energy source in the world: it is going to follow the course of entropy.
As a fantasy writer, I feel the philosophy behind the use of magic in fiction is something one must understand deeply before and while writing fantasy fiction. Even if you are working within a system that Sanderson might call "soft" magic (where the reader is never quite certain what magic can and can't do; this might be applicable to magical realism), if you have some of these concepts in mind, the story will operate more coherently than if you simply threw in magic higgledy-piggledy. Magic isn't the only thing that makes fantasy. The earliest theorists on fantasy like George Macdonald believed fantasy had to be self-coherent and internally consistent.
ETA: "You can't cross a sea by merely staring into the water." - Rabindranath Tagore
Sources: The Fantasy Tradition in American Literature by Brian Attebery (p.143)