it can be from having a kidney stone. maybe you're gonna pass one soon. if it's a persistent pain, i'd see a doctor.
Possibly a hernia. Take a look at this:
I felt that when i started getting out of shape.
you should see a doctor about it