Okay a lot of people are telling you to pop it but don't listen to them. The dick is a very dangerous area to pierce because it's kind of like a balloon filled with blood when it's erect, and so a full puncture can cause lots of bleeding.
Instead what you want to do is grab some sharp scissors, and pinch the skin around the pimple so that it is far away from the shaft and just snip off the pimple. That way you remove it without the danger of puncturing your shaft and losing a lot of blood.
Trust me on this, I'm a dermatologist IRL and it's actually a pretty common mistake people get brought in for when they try to take care of these issues by themselves without professional advice.