Codeine is a prescription medication used to treat mild to moderate pain and, in some cases, to suppress cough. It belongs to a class of drugs known as opioids, which act on the central nervous system to reduce the perception of pain and produce a calming effect. Codeine works by binding to opioid receptors in the brain and spinal cord. Once taken, a portion of codeine is converted in the body into morphine, which enhances its pain-relieving properties. This mechanism helps decrease discomfort and can also reduce the urge to cough by acting on the brain’s cough center.