When light from a star passes through the Earth's atmosphere, it is refracted (bent) by different amounts as it passes through layers of air with different densities. This causes the star's light to appear to dance or shimmer in the sky. The amount of twinkling that a star exhibits depends on its position in the sky and the conditions of the Earth's atmosphere.