Misdirection is a vital tool in the magician’s bag of tricks. By waving his hand over to the side, an illusionist can guide your attention away from the fact that he just put his shoe on the table until the last possible moment, all without you ever noticing. Dr. Daniel Glaser, director of the Science Gallery at King’s College London, explains the science behind why this works in a brief Guardian article.
Our nervous system is really about filtering out rather than relaying information - if we were aware of all of our sensory inputs all the time, we would rapidly be overwhelmed. Attention is the way we direct the spotlight, ignoring the background and focusing on what matters.
Our visual cortex causes our brain to only focus on what we're looking at. It's this internal wiring that allows optical illusions to fool our brains, and it's that same trickery that makes the act of causing cards (or shoes) appear out of thin air look like magic. The more you know.