Opioids are a class of drugs that derive from, or mimic, natural substances found in the opium poppy plant. Opioids work on opioid receptors in the brain and other organs to produce a variety of morphine-like effects, including pain relief.