To an observer on the earth the stars appear to twinkle. This can be ascribed to
The fact that stars do not emit light continuously
Frequent absorption of star light by their own atmosphere
Frequent absorption of star light by the earth's atmosphere
The refractive index fluctuations in the earth's atmosphere
Refractive index of earth's atmosphere is variable through out the atmosphere, it fluctuates with altitude which makes the stars appears to twinkle.