Hi there,
From your description it suggests that it could possibly have been a sebaceous
cyst, not just a regular pimple. It usually does not hurt, which is why it can be there for months or even years without causing any problems. It starts hurting when it gets infected, which is probably what happened with yours.
Usually what is done when it gets infected is that we make a small cut in the cyst to drain the pus and infected material inside, because this would make the healing quicker. If you feel that most of the material has already drained and that the wound is fairly small (less than a centimetre), you could probably just clean it on your own at home with some antiseptic solution containing
chlorhexidine or
iodine twice a day to make sure the infection doesn't come back. If you have some antibiotic cream e.g.
fucidin or
mupirocin on hand, use it on the wound after cleaning.
The black ball is probably just leftover blood that has clotted within the wound. If you are unable to expel it, just leave it and continue to clean the wound daily and wait for it to get absorbed.
The problem is that sebaceous cysts that are not removed whole together with its sac, or lining, tends to recur again after the infection resolves. In your case it is not possible to do that since it is already infected. Once the wound has healed and there is no more pain, drop by your local doctor to try to get it removed whole, which will reduce the chances of it happening again.
Hope this helps.
Regards,
Dr. Teh