Opiates or opioids are drugs used to treat pain. Opiates are derived from plants and opioids are synthetic drugs that have the same actions as opiates. The term narcotic refers to either type of drug.| medlineplus.gov