Thanks for your query.Based on the facts that you have posted it appears that you have Genital Mucocutaneous Candidiasis
Please get your Blood tests done to rule out Diabetes
.Take some anti fungal medication
like Flucanozole for three days along with tropical anti fungal cream for local application.Get prescription of these drugs from your family Physician,
If you have problem in retracting foreskin it may most likely to be due to Phimosis.Consult qualified Surgeon or Urologist
for examination .You may need to get circumcised.