Certain drugs can affect the subjective qualities of perception, thought or emotion, resulting in altered interpretations of sensory input, alternate states of consciousness, or hallucinations. This general group of pharmacological agents can be divided into three broad categories: psychedelics, dissociatives and deliriants. All of these agents act as neurotransmitter mimics, often as agonists or antagonists at neurotransmitter receptors. Their primary effects are markedly different from those of other psychoactives such as cocaine, amphetamines, heroin or alcohol.
The term hallucinogen is often broadly applied, especially in current scientific literature, to some or all of these substances. The term is attracting increasing criticism, however, for being ethnocentric, dependent upon too broad a definition of hallucination, and implying that certain symptoms that are actually only associated with some substances are applicable to all of them.  In all but a tiny minority of psychedelics, dissociatives, and deliriants, hallucinations of various kinds are only one of many effects produced. The nature of the hallucinations produced is dependent on the specific compound. Broadly speaking, psychedelics reduce the filters in the brain causing sensory overload which is often manifested in visual and audial distortion, dissociatives cause a separation between cognition and sensory awareness (possibly including hallucination or dreamlike experiences), and deliriants are a class of drug that often produce a terrifying fragmented dissociated state of quasi-consciousness akin to sleepwalking where dreams and reality intertwine to produce potentially dangerous hallucinations indistinguishable from reality.
These substances have a millennial history of traditional use in medicine and religion, where they have been prized for their perceived ability to enhance certain abilities and promote physical and mental healing. Together with other plant agents, like tobacco, they are thought to be the primary tools of shamans and other hierophants. Native American practitioners using peyote have reported success in treating alcoholism, and Mazatec practitioners routinely use psilocybin mushrooms for healing and divination.