Thanks for your query.Based on the facts that you have posted it appears that you have infection of the glans
of your penis called as Ballanitis.
Please take broad spectrum antibiotics along with anti inflammatory medication like Diclofenac
twice daily along with topical antibiotic
ointment like Neosporin
for local aplication.
Get the prescription of medicines from your family Physician.
Ensure to clean your genitals with warm water twice daily.
It should get cured within a week,