Hydrocodone is a commonly prescribed medication used to treat moderate to severe pain. It belongs to a class of drugs called opioids, which work by binding to opioid receptors in the brain and spinal cord to block pain signals. Hydrocodone is often combined with other pain relievers, such as acetaminophen, to increase its effectiveness.