Glaciers are made from snow. They begin to form when snow remains in the same location for a long period of time enough to form ice. Each year, new glaciers are formed and they compress the previous layers.
The compression forces snow to re-crystallize. Thick layers of snow are gradually compressed to glacial ice. A glacier might look like a solid block of ice, it will amaze you to know that a glacier actually move but the movement of a glacier is slow.
When glacier reach an ocean, large chunks break off and fall into the ocean.