Codeine is a chemical that belongs to the opioid drug subclass. It is derived from the opium poppy plant and has analgesic (pain-relieving) and antitussive (cough-suppressing) properties. Codeine is thought of as a relatively weak opioid when compared to stronger opioids like morphine or fentanyl.
Codeine works by binding to opioid receptors in the brain and spinal cord to reduce pain perception. Since it also affects the brain's cough response, it is widely utilized in cough medications.