do you have to go to the doctor for a UTI?

So do you have to go to the doctor for a UTI??