Carl Zimmer over at Discover Magazine elucidates about the science behind the illusion:
As you’ll notice, the circles seem to rotate in response to where you look at the illusion. So [Stephen] Macknik and his colleagues tracked the movement of people’s eyes as they gazed at two of these wheels on a computer screen . . . [they] found a tight correlation between the onset of the illusion and a kind of involuntary movement our eyes make, known as microsaccades. Even when we’re staring at a still object, our eyes keep darting around…the pattern of colors and contrasts in the Rotating Snakes Illusion causes our eyes to send rapidly changing signals to the brain even during microsaccades. The motion neurons switch on, and the snakes start to slither.