Thanks for the query.
You might have developed bacterial abscess
It might have occurd due to ingrown hair,
Another possibility is a condition called as hidradenitis suppurativa
A photograph would have helped me better.
Treatment is with antibiotics.
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.