You started to have pus because of the infection. Later, chronic infection led to the formation and systematization of granulation tissue, so you grew a hard pimple. Sometimes it's big, sometimes it's small, because in fact, the infection inside is not good, but the infection focus is wrapped by systematic granulation tissue.
You should use antibiotics, go to dermatology or cosmetic plastic surgery to cut this place to drain pus and remove granulation tissue at the same time.