Sounds like jock itch or something like it. Get some over-the-counter anti-fungal spray, powder, or cream.
From now on, you need to shower when ever you get sweaty to prevent this from happening again and keep the area cool and dry. Avoid tight-fitting clothing.
If it isn't significantly better in two weeks, go see your doctor.