There are a number of different conditions that can cause blood to appear in the urine. Although most of them aren't serious they usually do all require medical assistance to diagnose. To give it its medical name blood in the urine is called Hematuria, and it is more common than most people think. It affects around 10% of the world population at some point in their lives, and the causes range from the benign to the life threatening.
There are in fact two types of Hematuria. Firstly there is microscopic hematuria. This is where the amount of blood in the urine is so small that it can only be seen with a microscope, hence the name. You will only even know about this type if you are having medical tests already, and this is usually nothing immediately serious. More often it is a sign of possible things to come, particularly if it recurs on a regular basis. It is even possible to have this type of blood in the urine without any discernible cause, and without any ill effect, so it is usually nothing to worry about.
The more troublesome kind of blood in the urine is macroscopic or gross hematuria. This does tend to be more serious generally, and is usually a sign that something else is wrong. The difference being that the blood in these cases is enough to be noticeable during urination. Also the passing of the blood may or may not be accompanied with pain.
Determining where the blood is from is an important thing to do to make a diagnosis in cases such as this. The best way to discern this information is to look at the color of the blood appearing in the urine itself. If the blood you see is dark in color and contains clots, then it is usually from higher up the urinary tract somewhere. If it is bright red this indicates that it is fresh and is more then likely to have come from lower down in the tract.
Secondly you should analyze the situation that the blood has occurred in. If you have just finished with a strenuous workout, or a lot of running, then this can be the cause provided that it doesn't happen again afterwards. This is then usually a passing symptom and is nothing to worry about. It is a sign of minor trauma to the bladder where it has been shaken and knocked around while you were active. Although exercising is the most common cause it can also be something as simple as a lot of heavy lifting whilst at work, or straining yourself harder than usual.
Blood in the urine is a common sign of a urinary tract infection as well. Although urinary tract infections don't always produce blood in the urine, so you can still have one and not see any blood present. These are usually very painful, and will be coupled with either difficulty urinating or pain/a burning sensation when doing so. They are also usually easily treated with a course of antibiotics and can be cleared up in a few days. Similarly there are a variety of sexually transmitted diseases that can cause similar symptoms to this as well, including urinary bleeding.
Kidney stones are another common cause of blood in the urine as well. Most of them are passed naturally, although often with some pain involved as well. The blood in this case is caused by the stones scraping along the inside of the urinary tract as they move around and eventually pass through the urethra. Although it is possible to pass stones naturally in most cases a physician should still be consulted for help with steps that should be taken to aid the passing more easily, and possible pain medications as well.
In older people particularly, blood being present in then urine can sometimes be a sign of bladder cancer. In younger people, this is a very rare form of cancer to get, although in older people it is the 4th most common form in men and 9th in women. The reason it is a lot more common in men than in women is due to the androgen receptor, which affects male hormones.
Schistosomiasis is another common cause of blood in the urine in certain parts of the world. This is a parasitic illness caused by several species of fluke commonly found in freshwater snails. Because of this the disease is also sometimes known a snail fever, and is most common in Asia, Africa and South America where freshwater snails are more prevalent. Although this is a rare illness in the developed world, as many as 200 million people are affected worldwide at any one time.
There are also some types of medication that can cause it to appear as if there is blood in the urine where there isn't any. Quinine for example (a drug commonly used to treat malaria) can give the urine a pink/red tinge that can sometimes be mistaken for blood being present. In these cases it is always best to check with the doctor that prescribed you the drugs whether this is a side effect. Also remember that real blood will make the urine very red even in small quantities. One part in a hundred is enough to see that blood is present, and it is usually a distinct dark red shade that can be seen, not a pink one.
Those are the most common causes, although there are many more that it can be as well. Prostate infections in men, as well as some sexually transmitted diseases as well can all cause bleeding into the urinary tract. The best thing to do is whenever you experience blood in the urine to check with a trained medical professional. The causes usually aren't serious and there is usually an easy treatment that can put a stop to it in a matter of days.