Based on the information it seems like a "sebaceous gland
Here is what we mean by sebaceous gland and its obstruction, their are glands(bunch of cells modified to do certain things) called sebaceous glands which secrete the sweat and an oily substance called sebum, they have an opening at one end and closed at other like a bottle normally it can get the production out from the opening but due to one or other reason the opening is closed/sealed and hence the production of sweat / sebum can't come out so it starts building up and it seems like a bump still at this time it will be painless at this time ,
But it might get infected and the infection makes it painful.
Nothing to worry its very common AND Nothing need to be done just try warm compresses and try if it can open the clogged gland.
In case of infection
You need to consult your doctor whom you are comfortable with.
here is they most likely do
1) will take a visual inspection
2) prescribe some antibiotic and pain medication
3) if nothing works they need to make a small cut to drain the pus and collected sebum , may not need to make even a cut some cases they can just put a needle and drain out the stuff.
Hope it helps.