Sometimes, no treatment is necessary. Blood in semen might go away on its own.
However, if the blood is a sign of another medical condition, then treatment of that condition usually takes care of the situation. For example, if an infection is causing the bleeding, taking an antibiotic to cure the infection will likely make the bleeding stop.