Blood in the urine could be due to multiple factors like, urinary tract infection
, stones in kidney
or urinary tract, kidney disease or pain medication. Visit your doctor for workup to find out the exact cause and further management. In the mean time keep drinking lots of fluids, frequent voiding of urine and follow safe sexual practices.