Ultram is used to relieve moderate to moderately severe pain. It's extended-release tablets are only used by people who are expected to need medication to relieve pain around-the-clock for a long time. Also it falls in a class of medications called opiate agonists. It works by changing the way the body senses pain.