The short answer is, probably, yes. You are describing the most classic signs of a urinary tract infection
(also known as a bladder infection), which are dysuria (pain, burning, or discomfort with urination) and frequency (having to go to the restroom more often). While this does not always mean that you have a urinary tract infection, it is pretty certain that you at least have that problem (although there may be other infections as well, as they often are found with other genital infections). You will need to speak with your doctor
to describe your symptoms, have a urine test, and begin treatment. Fortunately, these usually respond very well to antibiotics, and you can expect to begin feeling better very soon. There are other things that can mimic bladder infections, but if you are a woman, it is likely that a bladder infection is the cause because the urethra (the part of the body that carries urine from the bladder and out of the body) is so much shorter and so bacteria are more likely to make the trip without difficulty. Please speak with your doctor to confirm this diagnosis and to begin treatment before your infection becomes more serious.