Magic is the difference between result and effort--or to put it more simply, the difference between what you see and what's been put in. Consider the hours of practice it takes for a magician to master his trick, ensuring that the audience sees it at just the right angle every single time he performs.
Any activity that can be mastered, displayed at its highest form, is liable to produce moments of magic. You can even call them "miracles." We see it all the time in sports. They're the buzzer beaters, the hole-in-ones, the comebacks, the perfect confluence of events that result in an outcome that rests squarely in the zone of statistical improbability--and yet, it still happens.
Magic isn't something extraordinary; rather, it's a function of the ordinary. Every activity, at its core, is a system of reproducible actions. It's a matter of stretching that system to its limits. To reach the highest peaks, it requires infinite amounts of practice, patience, and persistence.
If you want to create magic, imagine an accomplishment unseen, within the limits of capability, but beyond the average of effort. Sometimes, it's the small things taken to the extreme, that creates that wonderful thing we call "magic."