Opioids are a class of drugs that include prescription painkillers like oxycodone and hydrocodone, as well as illegal drugs such as heroin. These substances act on opioid receptors in the brain to produce pain relief and euphoria, but they also carry a high risk of addiction and overdose.