You definitly need to go and consult a doctor on this, but what might be happening is you have a urinary track infection.
You need to have it treated otherwise it will cause very sever problems for you later on.
Its not as a big of a deal if you treat it early on, doctor would usually presribe antibiotic for you and inshalla that should take care of it. But i would definitly not wait and see a doctor.