Hi, Thanks for query,
It seems that you might be having Fistula- in- ano giving rise to this problem.
In this condition there are multiple sinuses
are there and open into anal canal
there is collection of pus in the sinuses and burst open out side as this happened with you.
Consult surgeon and get examined.
Ok and bye.