How do u get UTI’s

It hurts more than ever, could it be from not using condoms ?