A glacier is a thick mass of ice which is formed by the accumulation, compaction, and recrystallization of snow. They form on land, and they move under conditions of plastic flow.
Glaciers begin to form when the snow pack from the previous winter does not completely melt. Recrystallization and alternating partial freezing and thawing of the snow results in nivi (French) or firn (German), a granular snow which has not yet changed to ice. As more and more snow accumulates on top of the nivi, the nivi is further compacted and recrystallized until it becomes glacial ice at a depth of about 50 meters.
Glaciers advance when the rate of accumulation is greater than the rate of ablation (loss), and they recede when the rate of ablation is greater than the rate of accumulation.