Rain rot sounds absolutely horrendous. It's also called rain scald. It's a bacterial infection of the skin.
Rain rot, from the name, is obviously associated with rain - the most common trigger for the condition is being out in wet conditions for extended periods of time. Very high humidity can also cause it, as can a lot of insects - and those two things, of course, often go together. These factors compromise the skin and give entry to the bacteria that causes it.
The infection causes inflamed skin lesions and hair loss. The lesions eventually scab over.
It's treated by bathing the horse with an antimicrobial shampoo and then immediately using a soft curry to remove the scabs. (If it goes untreated and worsened, the horse may need antibiotics). It's not as horrible as it sounds, but does tend to occur in areas you want to put saddle or harness. It's also contagious (to other horses, but not to humans or other animals).
Rain rot is prevented by regular grooming and keeping horses dry as much as possible. It's one of the reasons you'll often see horses in wet climates such as northwest Europe wearing "coats" outside - they're actually equine rain slickers. (Horses can take a lot of cold but don't like getting wet).