Long spikes on the soles of shoes help a better grip on ice. The sharp edges of the spikes create a high pressure or stress due to their small surface areas. So they pierce through the ice. So there is more friction during a small fraction of time. So the skidding is prevented.
The spikes have to be long. If spikes are not long and soles are smooth, due to high pressure, ice melts quickly, so it is possible to skid and skate. The ice skating is on the principle of skidding with a thin layer of water under the skates.