Thanks for the query.
You might have developed furuncle
It can happen due to ingrown hair.
These are deep bacterial infections.
Treatment is with antibiotics.
You can apply a topical antibacterial cream like mupirocine.
Also do hot fomentation,
It will help in pointing of pus and will reduce pain.
Please meet a dermatologist
for exact diagnosis.
Let me know if you have any other doubt.
you can ask a direct question to me on this forum, following the below link.
Wishing you a good health.