It can be an infected hair follicle or a boil or a sebaceous cyst. A boil, also referred to as a skin abscess, is a localized infection deep in the skin. Apply warm compresses on the boil and keep the area clean.Drainage of the boil is done only when it becomes soft and forms a head. Take some over the counter pain reliever and consult a doctor for examination and antibiotics prescription.
It is very difficult to precisely confirm a diagnosis without examination and investigations and the answer is based on the medical information provided. For exact diagnosis, you are requested to consult your dermatologist. I sincerely hope that helps. Take care and please do keep me posted on how you are doing.