Hurting when you Pee

Lately it hurts when I pee and I'm wondering why? I have barely started to become sexually active could this be it? And if so how can I fix it?