Prescription opioids are often initially prescribed for legitimate medical reasons like pain relief. However, if a person develops an opioid addiction and their prescribed medication becomes too difficult or expensive to obtain, some turn to cheaper and more accessible illicit opioids like heroin and fentanyl.