This is a simple game you can play, it'll only take a couple of minutes of your time. Start with a square, move about how they say and the guy will tell you with 100% accuracy where you'll end up.

There is no magic at all, it's just math - process of elimination. Based on the number of moves instructed he knows which squares will make it impossible to land on and go from there. Still, it's a neat trick that you can create at home and amaze your friends.