This is a type of illusory motion (or motion illusion) called the Enigma Illusion.
The cause of motion illusion in general is not well understood, but research suggests that there may be slightly different reasons for the different types of motion illusions.
A common theory is that particularly high-contrast colours are perceived separately in the retina (perhaps turning photoreceptor cells on takes a slightly different amount of time than turning them off), and as a result, the signals from the retina arrive at the visual cortex at slightly different times, causing the illusion of motion. Comparison of brain activity using fMRI between actually moving and apparently moving images shows similar activity in the visual cortex, supporting the assertion that the illusion is caused at the retina rather than at the visual cortex.
In the particular case of the Enigma Illusion:
When the eye movements, called microsaccades, were suppressed, test
subjects reported that the Enigma illusion — an illustration that
seems to flicker and turn — remained stationary.
That is, small, rapid, unconscious eye movements are also involved in creating the illusion.
Here is a nice collection of different illusory motion images: http://brainden.com/eye-illusions.htm
The reason for optical illusions such as this one is a side-effect of the way the brain processes typical visual information efficiently, at the expense of handling unusual situations incorrectly.