Dilaudid is the brand name for hydromorphone, an opioid pain medication used to treat moderate to severe pain. It works by binding to opioid receptors in the brain and spinal cord, which helps to reduce the perception of pain.