Assuming your balls are burning because you applied Nair or a similar hair removal cream, first wipe it with a soft cloth. Nothing as abrasive as a loofah because that irritates the skin. Apply cold water for ten minutes to cool the skin and rinse off the cream.
When you’re done, apply petroleum jelly to the area. Diaper rash cream also works.
If it’s not because of Nair, see a doctor right away.