Ice is a rather soft material and its crystals can deform permanently when exposed to sufficient stress. If you squeeze ice hard enough, its crystals will gradually change shape in much the same way that a copper penny will change shape if you squeeze it in a press. Since the pressures at the base of a glacier are enormous, the ice crystals there gradually deform to relieve the stress they’re experiencing. This slow deformation allows the whole structure of the glacier to move gradually downhill. If ice crystals were harder, like those in most rocks, glaciers wouldn’t flow. But they are very soft and so the glacier slowly flows downhill.