Depends on cause
If you are a sexually active female, this could likely be a urinary tract infection in which a doctor would prescribe antibiotics.
A doctor will do a workup to find the cause of the painful urination
and treat accordingly. It is difficult to say what your painful urination is due to without more information. See your primary care physician for diagnosis and treatment.
Answer assisted by Holly Barth, Medical Student