"Magic" is an extremely common element in fiction, and arguably part of the definition of fantasy as opposed to "science fiction". But what does "magic" actually mean? I'm not entirely sure myself, but I've had some thoughts.
I think the primary defining mark of magic is intimacy. Magic is forces that are some combination of:
Triggered/controlled by conditions intrinsically meaningful to people rather than scientifically definable. For example, a power gained from having a certain type of experience, or that only works when you're in genuine danger.
Reactive directly to the wielder's mental state
Inseparable from the person who wields them, instead of coming from a detached physical object
Putting it this way makes it more evident why many of us - myself included - are so attracted to the idea. Magical forces feel more personal than technological forces in a number of ways.
In particular I like how it's perfect for natural progression. It's a common theme that the hero gets stronger or more powerful as the story progresses, and when magic is magic instead of technology, this is easy. In both of my novels I've made magic grow in power from causes obviously contrived to make this happen.