An opioid is any psychoactive chemical that resembles an opiate in its pharmacological effects. They work by binding to the opioid receptors (Delta, Kappa, Mu) Which are found in the Central/Peripheral nervous system and in the GI tract.
Wikipedia
Erowid