Illusions, mostly optical illusions, are either generated by our brain or by the natural phenomena that occur under some circumstances. The illusions caused by our brains are created because the brain tries to compensate for a given situation/information that it does not understand.
Lots of times, optical illusions generated by our brain are also rooted in the culture we live in. The bushmen might not see an illusion where we see one.
The illusions generated by the nature can have something to do with how the light bends when it passes from hot air to cold air where such currents meet. This way you may see a boat floating above the sea water or you may not even see the boat at all.
Vsauce, thanks again for the explanations.