Dilaudid, or hydromorphone, is a potent opioid analgesic used to treat moderate to severe pain, particularly in cases where other pain relievers are inadequate. It works by binding to opioid receptors in the brain and spinal cord, altering pain perception and emotional responses to pain.