Keep 'em clean
Prevention is better than cure.
Remember to use small amounts of baby powder, since larger amounts tend to hold the moisture next to the skin instead of allowing the diapers to do their job. For a cure, meticulous hygiene, allowing the area to air dry, and using light amounts of over-the-counter products usually works. There are also prescription cures which you can get by seeing your doctor.