Psilocybin works by activating serotonin receptors, most often in the prefrontal cortex. This part of the brain affects mood, cognition, and perception. Hallucinogens also work in other regions of the brain that regulate arousal and panic responses.