Tramadol is a prescription pain medication used to treat moderate to moderately severe pain. It works by binding to opioid receptors and inhibiting the reuptake of serotonin and norepinephrine in the brain.