An optical illusion involves an image that uses physical objects that appear different from reality to the mind. Such illusions can be literal optical visuals that trick the mind, visuals that take advantage of the eye by overloading it with stimulus such as color and shapes or cognitive visuals that use subtlety to trick the viewer.
Making a cognitive illusion involves creating a visual image that can appear to be something else than what the shape's original seems to be. A common example of this is the image that looks like a silhouette of a young woman but when examined closely can resemble that of an old woman as well.
The eye and brain can be easily overwhelmed with colors, patterns and angles to make an illusion successful. By intentionally using some stimulus to draw the eye's attention one way, the creator can hide a different shape or image within the obvious one. The illusion of boxes being seen from the outside versus the reality of them being inside by simply changing the shade of black and white squares in the picture is a well-known example of a visual optic trick.
By changing how the eye processes depth and shape, illusions can be easily created with simple changes in the curvature of the lines of an image. The room scene in the book and film versions of "Alice in Wonderland" provide a memorable example of this illusion. The room Alice is trapped in may seem like it goes on for some distance, but in reality it just gets too small for her physical frame very quickly as she moves around.