There could be many reasons for such a problem and it would be advisable to consult a doctor so that if it is due to some bacterial or other microbe infection then some specific antibiotics would be needed to cure it.
In most of the cases the reason could be the sensitivity of the soft penis skin to external force creating friction on it and if that is the case then indulging in forceful sexual or masturbating activities will further deteriorate the situation. In this type of situation generally special creams and lubricants are suggested by the doctor or expert sexology specialist but that is of limited use as the effect of friction on breaking of soft surface skin membrane would still be there albeit to a lesser degree.
Keeping good hygiene and regular cleaning of the undergarments using very hot water are some of the ways to avoid the infections which are sometimes responsible for this type of problem. Salt baths, cool compression, abstaining from sex etc are also some of the measures that could bring relief in these conditions.
Some of the medical conditions like Genital psoriasis, Eczema, Allergic reaction, Sexual transmitted infections, genital herpes, syphilis, gonorrhoea, Balanitis, foul-smelling discharge, Yeast infection, Lichen sclerosus, Peyronie's disease, Urinary tract infection etc are the indicative possibilities in such a situation and that is why an experienced doctor would be required to exclude all those things before reaching to a correct diagnosis.
Knowledge is power.