Hydrocodone is primarily used to treat severe chronic pain that requires opioid analgesia and is not effectively treated by nonopioid alternatives. It works by altering the brain’s perception of pain. Due to its potential for dependence, it should be used only under a doctor’s supervision to ensure safe and effective treatment.