Opioids are a class of drugs that include prescription pain relievers such as oxycodone, hydrocodone, and morphine, as well as illegal drugs like heroin. These substances are often prescribed for pain management but can lead to dependence and addiction when misused.