A lot of fantasy writers and readers will tell you that magic needs to have a clear set of rules, so you don't just have a situation where magic can do whatever the author needs it to do. A system of magic. But go too far in that direction, and you end up with something too much like technology.
So over in Fantasy Book Critic, there's a terrific essay by Jamie Schultz, author of Premonitions (pictured above), about the two extremes of magic: too many rules, and not enough rules. Schultz flips Clarke's famous law on its head and says that to be distinguishable from technology, magic has to be at least somewhat mysterious and hard to explain. Then he adds:
Magic that conforms to a tidy set of rules and explicit formulae is essentially indistinguishable from technology, and that doesn't feel like magic to me. Don't get me wrong—that approach is just the thing for certain types of stories, and it can work amazingly well.
Max Gladstone's Craft Sequence books are an incredible example of magic that is basically structured as a rigidly-ordered legal system, resulting in it providing the technological foundation for entire societies, and it works brilliantly, both on its own and as fertile ground for satire. Less effective authors operating within rigid rules systems tend to create things that feel exactly like that—rigid rules systems—generally, I believe, to the detriment of their settings.
At the other extreme is what I'll call the "pull it out of your ass" magic system. That is, magic that does whatever the plot needs it to do at any given moment. Exhausted characters suddenly find inside them the strength to perform one last feat of wizardry, or the talisman they were given in Scene 24 suddenly comes to life and saves their bacon or points them toward whatever it is they need next. In effect, magic spends most of the story acting as a gee-whiz form of armament for the magic-using characters, and then occasionally becomes the unsubtle hand of the author, writing his or her way out of a pickle....
Good magic systems have a framework, a set of limitations that is fairly clear to the reader, such that magic doesn't run the risk of blowing the internal logic of the story to Hell. That is, magic is part of the internal logic, not an excuse to kick that logic in the gutter. Within those limitations, I feel that magic should have an element of unpredictability.
The whole thing is very much worth reading. [Fantasy Book Critic]