Spikes increase the surface of the shoes & make it rough which results in an increase in friction. This helps to have more grip on the floor and chances to slip reduces.
This makes it easy for sportsmen to walk or run as their grip on the ground increases.
Sportsmen use shoes with spikes because of the better grip given by spikes while running. This is because the force of friction between the shoes and the ground increases with the help of spikes.