Welcome to Healthcare Magic
You could be having allergy
to the undergarment you are using or a fungal infection
. You need to avoid sweat accumulation in that area. Change your underwear daily with a new well washed underwear. Keep the area dry. Avoid sun exposure. Eat plenty of fresh fruits and vegetables. Drink plenty of water. You should consult a Dermatologist
who will examine you and fins the cause, most likely it is a fungal infection which will require anti-fungal medicines for few weeks. Do not delay.