Hi welcome to Health care magic forum. As you describe it appears to be a boil yet to be riped. As it ripes pus is accumulated in the swelling and pain starts.
I advise you to consult a dermatologist
, for diagnosis and treatment. If necessory he will get the discharge tested for culture and sensitivity besides other routine tests for confermation of any other diseases like viral diseases and S.T.D.
I advise you not to squeese it as it may cause the secondary infections to occur, and the diagnosis and treatment is complicated.
I also advise to avoid foods like, pulses, potato , other tubers, and fish as these may increase the accumulation of the pus.
I wish you a speedy and complete recovery and thanks for calling.