This could be pearly penile papules, which although the cause is unknown are extremely common and show up more often on men who are uncircumcised. I would still recommend going to visit your local GP for a checkup incase if it could be Genital warts. But if it is these penile papules. You have nothing to worry about as they are not spreadable
Hope I could help you :)
To know how to get rid of them, you need to first figure out what the cause is. It could be something from the heat, poor hygiene, a bacterial or fungal infection- among just a few of the possibilities. You are probably best off making an appointment with your doctor and having them take a look- gathering more information about the bumps and your medical history so you can get a more concrete answer.