Hello,
It can be due to dyspareunia. It can be due to infection of the vagina, cervix, tubes by bacteria, yeast; lower urinary tract infection; endometriosis (deposits of the inner lining of the uterus in the pelvic cavity); ovarian cyst and tumors ;remnants of hymen; vaginismus (reflex tightening of the muscles at the opening of your vagina);vaginal dryness etc.
Application of mild corticosteroid cream and oral antiinflammatories like ibuprofen/acetaminophen are also helpful. If the symptoms are severe then it will be best to consult a gynecologist.
It is very difficult to precisely confirm a diagnosis without examination and investigations and the answer is based on the medical information provided. For exact diagnosis, you are requested to consult your doctor. I sincerely hope that helps. Take care and please do keep me posted on how you are doing.
It could be a yeast infection, I had those symptoms as well and thats what it turned out to be, the biggest tip off was pain during and after sex. Or it may be a bladder infection, I hope I ma wrong cause they both suck, easy to cure but sucky.
Good luck