Welcome to HealthcareMagic forum,
You are suffering from fungal infection
called tinea cruris
and corporis.This is usually seen in occluded parts of the body(folds) where one sweats a lot.You need a course of oral
anti fungal along with topical creams and anti fungal powder.This needs to be continued for at-least a month , after which you should see that it doesn't recur. Always maintain good hygienic conditions.