These mental "tricks", say some researchers from Carnegie Mellon (J of Neuroscience), can be from neurons in different parts of the visual system feeding your brain different signals--and the brain reacting.
Take optical illusions. The one in the picture is called the Kanizsa Triangle. You see a triangle, even though one if not outlined...your brain fills it in.
When we look at an object, the info travels through circuits on neurons beginning in the retina, then to the thalamus, and into the brain's visual cortex. In the visual cortex, the "data" gets processed in many stages and sent to the prefrontal cortex..where the brain makes a decision on it--how to respond.
BUT, not all the info stays on this forward path--at the visual cortex level, some neurons may reverse course and send some info back to the first stage.
They experimented on mice and found that 20% of the neuronal activity in the visual cortex was from feedback. In other words, the brain reacted not to the original "sight," but to stimuli that happened down the road.
So--bottom line--you can't always believe your lyin' eyes...I mean, brain.