"Magic" is an interesting category because, as a category, it seems to exist over a wide spread of cultures, although what is put into the category can be quite different from one place or time to another. Among the component, somewhat overlapping, qualities (in no particular order) of what is put into that category are those of being dreamlike or hallucinatory, of being surprising, of being hard to explain by "normal" means, and being fascinating.
(If something is down-to-earth, just what we expect, clearly susceptible to explanation in everyday terms, and rather pedestrian, few people would be tempted to call it "magical", although if it required intense study or discipline to accomplish it might well seem wonderful -- or at least make us wonder why anyone would bother!)
It could be that a difference between magic and science or technology could be characterized as a contrast between efficient and formal causes. For scientific and technological inquiry, efficient causes tend to be salient, whereas for magical investigations and operations, formal causes tend to be salient. This characterization runs into problems with "natural magic", or such correspondence-based practices as certain forms of Chinese medicine -- but it's interesting to see that many of these practices have been continued into our time not as "magic" but as procedures that can be subjected to critical experimental assessment.
In other words, although it's pretty easy to find contrastive categories like "magic/engineering" or "magic/science" or "magic/medicine" in many places and times, it's not so easy to specify what the differences are that are being named by those categories.