There are many causes of blood in the urine (hematuria). To list, here are a few causes:
- Kidney stones
- Urinary tract infection (UTI)
- Enlarged prostate
- Tumours
- Glomerulonephritis - also known as kidney inflammation
Apart from that, in some rare cases, vigorous exercises can cause blood in the urine.
10% of people with visible blood in urine have bladder cancer. Hematuria is a symptom of bladder cancer. This is why it is very important that you consult a doctor even if it only happens once. Moreover, it can happen randomly.
You may refer to this comprehensive article on what hematuria is, its causes, and how you can prevent and treat hematuria.