Magic mushrooms contain psilocybin, a drug that causes users to experience frightening but perhaps enlightening experiences. A new study has now revealed psilocybin produces these trippy experiences by altering the way the brain communicates with itself.

Researchers from King’s College in the UK used functional magnetic resonance imaging (fMRI) to take brain scans of two groups of participants: individuals who had received a 2 mg dose of psilocybin, and those who were given a placebo.

Brain activity typically follows specific neural pathways, and the scans initially showed random increased activity all across the brain. The team looked more closely at what appeared to be sporadic brain activity and found that the drug was actually forming different connections in the brain, and after the drug wore off, the brain activity went back to normal.

The findings, which are published in the Journal of the Royal Society, suggest that these connections enable parts of the brain that don’t usually talk to one another to communicate. These changed pathways can trigger an experience such as seeing sounds or smelling colours.

“Picture the information in your brain being shared across an interconnected and heavily-trafficked system of highways," says Eric Brodwin from Business Insider. "In that example, psilocybin isn’t removing the highways. Instead, it’s simply building new ones.”

This new understanding of what exactly psilocybin does to the brain provides evidence for studies that have found magic mushrooms to have striking psychological effects. Previous studies have shown that the drug can increase optimism, improve psychological health, and even help a person to quit smoking.

Mitul Mehta, a psychopharmacology researcher at King's College London, who was not involved in the study, told Tia Ghose from Live Science, “Through studies such as these we can really begin to tackle the questions of how we achieve coherent experiences of ourselves in the world around us, and understand what makes this break down.”

Sources: Live Science, Business Insider