Answer: Atmospheric refraction of starlight.
Starlight passes through layers of air whose temperature and density, and so refractive index, keep changing. The light is refracted by different amounts from moment to moment, so the apparent position and brightness of the star keep changing and the star appears to twinkle.