Codeine is a prescription opioid medication commonly used to help manage certain types of pain and, in some formulations, relieve coughing. It works by acting on specific receptors in the central nervous system, helping reduce pain signals and alter the body's response to discomfort.