When u skate on ice and overcome the force of friction u generate energy or heat. This heat generated instantly melts the ice as a skater travels. But because of the refrigeration unit under ice, the section on which they just skated on, refreezes
The trails when you skates quickly re-freezes once you have passed by.