Opiates are psychoactive substances that are naturally derived from the sap of the opium poppy (Papaver somniferum). The milky sap (also called raw opium) contains many different alkaloids. The best-known natural ingredients include morphine and codeine.

Opioids are synthetically or semi-synthetically produced psychoactive substances that produce effects comparable to those of opiates. Known fully synthetic opioids are, for example, tramadol, tilidine, oxycodone or fentanyl . A well-known semi-synthetic opioid is heroin. This is obtained from morphine in a chemical process (acetylation).