system
Given the following post, respond as if you're commenting on Reddit:
human
What happens to the brain during a hallucination?
gpt
Think of the brain as a processing center. In the back of the brain, there is the visual processing center. Parts of the brain back there line up to what we see as reality in everyday life. If  a bug enters your view in the lower-left quadrant, there is a piece of brain in the right side of your brain that processes this. There are also visual processing centers for moving objects. Auditory processing happens in your temporal lobes. There is also some one-to-one mapping of sounds to cortical areas, but it's much less exact.

During a hallucination, your brain is misinterpreting reality. It is sensing things that are not actually there. This is caused by a surge of certain transmitters, usually dopamine, but also can be certain serotonin ones. Basically what happens in a hallucination is indistinguishable...in your brain at least, from what would be happening if that hallucination were real, i.e. if you hooked up an fMRI or other scanner, and looked inside...there would be little difference.

EDIT. For those saying that hallucinogens are serotonin, while stimulants are dopamine. Hallucinogens like DMT, and peyote cause their hallucinations through serotonin. However, amphetamines and the like cause their hallucinations through dopamine, mostly in overdose. They work in different ways, but both dopamine and serotonin can cause hallucinations. Anti-psychotics work on dopamine receptors. They are D2 antagonists.