When you walk, you push backward on the surface. According to Newton's third law, the surface exerts a forward reaction force on you. The horizontal component of this reaction force is the friction force. Ice is much smoother than a road surface, resulting in a much lower coefficient of friction. This low friction makes it difficult to exert a significant backward push without slipping, thus making it hard to generate the necessary forward frictional force for walking.