As leaves and (light) rain/moisture end up on the track, they will inevitably then be compacted by any trains. The resultant mix bakes onto the rail, forming a layer of contamination which (as said above) has basically the same slippery effect as ice. Further problems can be caused by any rain, sleet or snow either freezing onto the rails or, even worse, onto the contamination. The railheads will sometimes be around 5ºC below the air temperature, although this can in turn vary with ground temperature.
All this slippery stuff means train wheels cannot grip when moving, and therefore they may be damaged and get "wheel flats", where the wheel is deformed by the pressures of trying to turn or brake on such contamination. In addition, wheels may "lock up" on slippery stretches, so the train may overshoot signals or station calls when braking. Furthermore, electrical insulation caused by leaves on rails used by track circuits can actually cause failures of those, as the track circuits fail safe and the signalling systems show sections as "occupied" by leaves rather than trains.
This can be combatted with various railhead treatment train options, including water jetting and laying sandite/gels/deicers; plus there's sanding equipment and Wheelslide Protection (WSP, used to adjust power to the bogies/axles) on many trains, drivers should use special driving techniques, and there's often frequent running of "ghost trains" to ensure rails are kept clear (though this latter option usually applies to snowy rails). Nevertheless, all this can be an operator's worst nightmare, not least for their driving staff.