Hi welcome to Health care magic forum. It is a boil of improper treatment, and it appears to be deep seated abscess
. Depending upon the length of its duration there could be underlying bone.
I advise you to consult a surgeon for diagnosis and treatment. probably it needs irrigation of the underlying bone after the confermation of the infection of the bone, for complete relief.
If there is no bone infection
a complete course of antibiotics will hold good to manage the condition.
Besides i also advise you some diet recommendations as avoid taking potato, other tubers, pulses, and fish to minimise the pus formation and pain.
Wishing for a quick and complete relief of the problem and thanks for calling.