There are two types of glaciers - those on land, and those on the sea, and they are formed differently.
At sea - for example, in the Arctic Ocean around the North Pole, the air is below 32 degrees Fahrenheit (0 Celsius) most of the time. So the water on top of the ocean freezes. The water freezes without the ocean's salt staying in it, so glaciers are not very salty. They float on the ocean. Where the weather stays cold, they get thicker and higher. They are flat overall, but get jumbled up by waves and storms. Where the temperature is warmer, they break up, creating icebergs that float away and often head south with the current, melting in the northern oceans.
On land, on mountains that are far north or south, or very tall, there can be more snow falling each year than melts each year. If so, snow piles up on the mountain (or mountain range) and is compressed into ice.
Now, in many places that have had glaciers growing for thousands of years, the glaciers have started to shrink in the last few years.
Ice is not simple - it is complex and beautiful, full of different colors, different compressions, different crystals and air and other inclusions.
And the taste of water in a racing stream just melted from a glacier - I've had it just once - nothing like it!