Opioid drugs bind to opioid receptors in the brain, spinal cord, and other areas of the body. They reduce the sending of pain messages to the brain and curb feelings of pain. Doctors use opioids to treat moderate to severe pain that may not respond well to other pain medications.