The twinkling of stars is due to atmospheric refraction. The light given off by a star is clear and steady. But most stars are so far away that we see them as only a tiny point of light. When the light reaches Earth, it passes through many layers of air. Some of the layers are cool and some are warm. When the light from the stars travels through those layers of air, the light is bent back and forth. That makes it look as if the stars are twinkling.