Opioids are a class of drugs that include the illegal drug heroin, synthetic opioids such as fentanyl, and pain relievers available legally by prescription, such as OxyContin, Vicodin, codeine, morphine, and others. Opioids are highly addictive and have depressant effects on the central nervous system.