Thanks for your query.Based on the facts that you have posted it appears that you have
Infected Sebaceous Cysts over penis .
However this needs to be confirmed by clinical examination by a qualified General Surgeon
The scrotal and penile skin is rich in sebaceous glands and hence prone to get more sebaceous cyst due to accumulation of sebum beneath the skin.
Normally they fade away without treatment however they need to be treated if increase in size or get infected.
Please take broad spectrum antibiotics along with anti inflammatory medication like Diclofenac
twice daily for a week..
Get the prescription of medicines from your family Physician.
It will get cured with this treatment.
However if problem persists even after taking medication you may need to get it excised in Toto by a surgeon.