In recent years, researchers in psychology and neuroscience have taken an interest in magic, and for good reason. Science advances by exploring areas where predictions are experience don't match (think of Einstein and the strange precession in the orbit of Mercury). Magic is exactly one of those circumstances.
When you experience a piece of magic, then later reflect back after learning the secret, it's often difficult to understand how you could have been fooled by something so simple — and the secrets behind magic tricks are often unbelievably simple. That means by the light of science there should be something interesting at work.
However most often when researchers try to tackle these issues, they miss the mark. After a superficial interview with a magician or a mentalist, they offer up their best guest at a just-so story. The most blatant example is the 2010 book Sleights of Mind written by two perfectly competent neuroscientists but whose explanations of tricks is downright goofy.
This recent article by Steven Novella at NeuroLogica is refreshingly astute and well worth reading.
Magicians have learned to use various cues to enhance such illusions. They may verbally create an expectation. They also use social cues, like where they direct their vision. Their eyes will follow the non-existent ball, encouraging our brains to top-down perceive it. Further, the entire act can create a meta-expectation that something fantastic will occur. Everyone knows that magic is not real, but the magician creates the impression that they have fantastic skill, and are doing something very complex. The astonishment of those around us may also encourage us to be astonished.