The opioid drug hydrocodone, prescribed by doctors to treat moderate-to-severe pain, can be used for various conditions. It is an effective pain reliever, often prescribed for chronic pain, cancer pain, or after surgery.