it may be due to a condition called 'balanoposthitis'. if u r a diabetic please ensure a normal blood sugar control. take care of daily cleaning with water. A local plain steroid
like 'BETAMIL' ointment may help. But if it is red and discharging, antibiotics in consultation with surgeon is required. If skin is not retractile completely, the best solution is circumcision- surgery to remove foreskin. Circumcision is anyway the best and permanent treatment for the condition.