Codeine is a naturally occurring opioid derived from the opium poppy, used to treat mild to moderate pain and suppress coughs. It works by binding to opioid receptors in the brain, reducing pain perception and cough reflex. A small portion converts to morphine in the body for its effects.
https://www.grepmed.com/CodeineFacts