I recommend that you go see your primary care doctor
about this issue right away. The fact that the lump is painful, in particular, suggest to me that you should have it looked at.
There are many potential causes of a bump in this area of the body under the skin. If the bump is high up in the groin crease, then it may be an inflamed lymph node. A painful lymph node in this part of the body would usually be a sign of an infection in the groin or in the leg on that side, which should be identified and treated.
If the lump is farther down the leg, then it could be an abscess
or a boil, both of which represent deep infections of the skin that often need to be opened up and drained, and sometimes treated with antibiotics, in order to heal.
The lump could also be a cyst, or benign growth under the skin. Although these are usually asymptomatic, they may sometimes become painful, either because they become large and press against the skin or because the become infected.
Start by making an appointment with your primary care doctor for an evaluation as soon as you can.