Most cases cannot be prevented because the cause is unknown. Urethral stricture and infection of the urethra are often due to sexually transmitted diseases. So practicing safer sex could prevent some cases of blood in the semen.
There are usually no long-term effects. Many affected men have repeated episodes of blood in the semen with no other symptoms or problems. Urethral strictures are usually permanent unless they are treated. Cancer is quite rare but could possibly result in death.
Blood in the semen itself is not contagious. If the cause is an infection such as a sexually transmitted disease, the infection may be contagious.