Thanks for your query.Based on the facts that you have posted it appears that you have developed either Staphylococcal infection
of the hair follicle (Boils
) or infected Sebaceous cysts over shaft of the penis,
Visit qualified Urologist
for clinical assessment and treatment.In the mean while start taking antibiotic like Doxycycline twice daily .Observe good personal hygiene.
It should get cured in a week .