Hello Welcome to HCM. Sorry to know your condition but I suggest you not to worry. Need your age to address what exactly is the problem.
The condition you are suffering from is called
Hematuria.
There are various causes for this.
In younger people, generally it's bcos of Calculus.
Kidney, Ureteric, or Urethral.
And in old people generally it is due to Malignancy.
I again
stress, do not worry. It's not a major problem unless you get evaluated completely.
And the pain that you have is due to blood clot, that's called clot
colic.
Do these things,
1. No worries
2. Get Urine Routine tests done, it'll tell us how many
RBC, red blood cells are noted.
3. It could be simple infection, called UTI causing heamaturia, so get a Urine Culture.
4. And a Renal scan, USG. These are basic. Later we can think over.
Hope this helps you, get back to me. I've seen many such cases and you need not worry.
Thank you for posting your question. Take care.