Your brain creates a simulation of the world that may or may not match the real thing. The “reality” you experience is the result of your exclusive interaction with that simulation. We define “illusions” as the phenomena in which your perception differs from physical reality in a way that is readily evident. You may see something that is not there, or fail to see something that is there, or see something in a way that does not reflect its physical properties.
Just as a painter creates the illusion of depth on a flat canvas, our brain creates the illusion of depth based on information arriving from our essentially two-dimensional retinas. Illusions show us that depth, color, brightness, and shape are not absolute terms but are subjective, relative experiences created actively by our brain’s circuits. This is true not only of visual experiences but of any and all sensory perceptions, and even of how we ponder our emotions, thoughts, and memories. Whether we are experiencing the feeling of “redness,” the appearance of “squareness,” or emotions such as love and hate, these are the result of the activity of neurons in our brain.
Yes, there is a real world out there, and you perceive events that occur around you, however incorrectly or incompletely. But you have never actually lived in the real world, in the sense that your experience never matches physical reality perfectly. Your brain instead gathers pieces of data from your sensory systems — some of which are quite imprecise or, frankly, wrong.