Pimple on penis

Patient: I was urinating the other day. Accidentally, I pressed my penis a little too hard. It really hurt a lot. Couple of days later I noticed a lump. I thought it was a blood clot. It turned out to be a big pimple (whitehead). Few days later, it opened up and pus started coming out. The same thing happened the next day too. Now, it has dried up. Could you please explain what happened? Thanks!

Doctor: