What causes illusions, delusions, and hallucinations?

Illusions are simple. perceptual distortions, seeing things that aren't there because of low lighting, atmospheric distortion, etc. Once light is shined on the cause, the illusion disappears. Delusions are fixed patterns of thought that do not respond to reality. Hallucinations are psychotic manifestations that have little to do with reality. The latter two are usually brought on by drugs or mental illness.