It may be that you have a condition called Balanitis.
I have copied and pasted the link below, so that you can read in more detail about balantis:
http://www.nhs.uk/Conditions/Balanitis/Pages/Introduction.aspx
Briefly though, make sure that you draw back your skin and wash with water. Do not use soaps, bath and shower gels. Non perfumed soap may be OK and a soap with the same pH level as our skin, baby washes may be fine.
Wear clean cotton underpants every day.
Bacteria can cause this condition as well as fungus. Sweating and being on antibiotics can encourage yeast growth. As a home remedy, you can apply natural set yogurt to your washed and gently dried area.
Do NOT masturbate until you are well healed.
Make an appointment to see your doctor if your condition does not start to get better with good hygiene.