Can be due to following reasons
1 infections in bladder or kidneys
2 bladder or kidney stone
3tumours and cancer of bladder or kidneys
4benign prostatic hypertrophy and prostatitis
5kidney disease like glomerulonephritis
6 inherited alpert sybdrome and sickle cell disease
7meds like aspirin, anticoagulants, anti cancer drugs
8 some time strenuous exercise can too
blood can be visible or microscopic.