Psychoactive drugs operate by temporarily affecting a person's neurochemistry, which in turn causes changes in a person's mood, cognition, perception and behavior.
Exposure to a psychoactive substance can cause changes in the structure and functioning of neurons, as the nervous system tries to re-establish the homeostasis disrupted by the presence of the drug (see also, neuroplasticity).