The refraction of light by the Earth’s atmosphere is known as atmospheric refraction. The earth’s atmosphere is not evenly distributed and is optically denser at the bottom while is rarer at the top. The velocity of light changes from layer to layer. The molecules of different gases and dust particles have different optical densities.
When an object transmits light rays in the atmosphere, these light rays pass through the atmosphere having different air layers of different densities and get refracted by the atmosphere.