When we see the world, we don’t just passively receive an image like a video camera. Instead, our brain makes assuptpions about how the world should be. Visual illusions work by violating those assumptions, causing us to see things that aren’t there, or fail to see things that are there. Scientists can use illusions to understand how the brain works.
I agree, illusions are fantastically amazing. My favourite one is actually to do with the sense of touch. What you do is your cross your first two fingers, close your eyes and then stroke your nose with the gap where the fingers are crossed over. After a while it will feel like you have two noses!