Both opiates and opioids are used medically. They may be prescribed for pain relief, anesthesia, cough suppression, diarrhea suppression, and for treatment of opiate/opioid use disorder. Both opiates and opioids may also be used illicitly by people with a substance use disorder. (altamirarecovery.com)
The main difference is in how opiates and opioids are made.
Opiates are chemical compounds that are extracted or refined from natural plant matter (poppy sap and fibers). Examples of opiates:
Opioids are chemical compounds that generally are not derived from natural plant matter. Most opioids are “made in the lab” or “synthesized.” Examples of opioids:
Information found on altamirarecovery.com