Tramadol is a prescription medication used for treating moderate to severe pain. It belongs to the opioid analgesic (an analgesic that blocks pain signals from reaching the brain) class of medications. Tramadol is available only through a doctor’s prescription as a pain relief option.