Thanks for the query,
You might have developed sebaceous cyst
It is a collection of dead material under the skin.
When you press this material comes out as black debris.
I think it got infected due to pressing.
Dont worry its not a dangerous condition.
Treatment is mainly surgical under antibiotic coverage.
It can be removed with the wall of the cyst, through a small incision.
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 good health,