Possibilities include infection or bladder/kidney stone. Less likely kidney/bladder tumor. Bladder cancer risk is higher if you are a smoker. The usual workup for this is a urine culture first. If this is negative, then a cystoscopy and CT urogram (CT of the kidneys kidney tubes and bladder to look for stones or tumors) would be in order. Often there is no direct cause found, but the workup is important to rule out serious causes. See a urologist or urogynecologist about this.
Dr. hoyte
Sounds to me like you have an infection or could be and std. I would call your doctor if its so bad to walk and it keeps you awake at night.