Notice that it does not magnify images when it is submerged. When light traveling through air encounters a glass surface at an angle, some of the light reflects . The rest of the light keeps going, but it bends or refracts as it moves from the air to the glass. You see a glass object because it both reflects and refracts light. When light passes from air into glass, it slows down.
Every material has an index of refraction that is linked to the speed of light in the material.
The higher a material's index of refraction, the slower light travels in that material. The smaller the difference in speed between two clear materials, the less reflection will occur at the boundary and the less refraction will occur for the transmitted light. If a transparent object is surrounded by another material that has the same index of refraction, then the speed of light will not change as it enters the object. No reflection and no refraction will take place, and the object will be invisible. Different glasses have different indices of refraction.