Optical illusions are caused by a mismatch of what the eyes see and what the brain interprets, according to ABC News. The brain is often tricked into thinking something is moving when contrasting colors are placed in close proximity to each other and repeated. This is why when people want a pattern to move like an optical illusion, the shapes of the pattern are outlined in black and white.
Optical illusions, however, are not always caused by repeating patterns. One example of this is when people see stars when they hit their heat really hard. People know they are not actually seeing stars, but the hard blow to the head causes neurons in the eyes to become visible for a short period of time. These neurons are misinterpreted by the brain as being light, so they closely resemble stars that people see in the night sky.
The term optical illusion is not the best way to describe this phenomenon, according to ABC News. It is best to call them visual illusions, because the illusion is caused by more than just the eyes. It is caused by the primary visual cortex, which is the area of the brain that helps to process visual information.