Dilaudid, known generically as hydromorphone, is an opioid pain medication used to treat moderate to severe pain. It works by binding to opioid receptors in the brain and spinal cord, altering the perception of pain and emotional response to it. Dilaudid is available in various forms, including tablets, liquid solutions, and injectable formulations.