A compound called psilocybin. When it is ingested, it is broken down by the liver into a compound called psilocin, which is responsible for the noted effects.