BOILS!

Pic off google BUT I get these all the time in my mid thigh and they hurt after popped. Can anyone explain why this happens or how to prevent it T.I.A