Tramadol (marketed as Ultram, and as generics) is an opioid pain medication used to treat moderate to moderately severe pain. When taken as an immediate-release oral formulation, the onset of pain relief usually occurs within about an hour. It has two different mechanisms. First, it binds to the µ-opioid receptor. Second, it inhibits the reuptake of serotonin and norepinephrine.