Optical illusions occur when we think we see something that isn't really there, or in some other way our perception doesn't exactly match up with the actual visual stimuli. I've done a little reading to learn more about these, and it seems that there are two different reasons for these illusions - physical and mental. By physical I mean that there is something about how the nerves are stimulated in the eye, or how they interact in the brain, that gives rise to the illusion. Mental illusions are when our perception (and I'm NOT going to try to dig into the whole mind/brain discussion* here) makes mistakes when it to fit conflicting or incomplete visual inputs into some recognizable pattern. There have been a lot of LEGO renditions of optical illusions, so I'm going to do a small series. I'll start out with the one that inspired this series. A couple of days ago Katie Walker posted this zig zag. I noticed that if you stare at it, the lines appear to be wiggling back and forth. This is a form of illusory motion. There seem to be conflicting views on why these work, but in general they overstimulate our eyes with repetitive patterns of colors and light and dark. They also are related to fixation jitter - our eyes don't sit still, but actually move around. I think that the differences between the way we perceive objects at the center of our visual field vs objects in our peripheral vision are also very important to these illusions, as with most of them the area at the center of focus is sitting still, but it's the areas just to the side that are moving (but when you shift your focus those areas sit still and the other starts moving).
* Okay, just a little bit in case anyone wants clarification. The mind/brain discussion is the question of whether your consciousness/self/mind is, at one extreme, simply a series of chemical interactions in the brain, or, at the other extreme, a nonphysical identity (a soul) that somehow interacts with the brain. Or is it somewhere in between. That's a deep subject that would involve neuroscience and philosophy and religion.