When I had it they gave me a two week course of Cipro.
It can be caused by a few things:
1) an STD
2) Sometimes if you create internal pressure by bearing down it can cause urine to flow backwards up the wrong plumbing. The urine then builds up bacteria, which causes inflammation. I think it happened to me from doing squats and Romanian deadlifts....or Romanian whores.