Dear student
The planets are very close to the earth, and are thus can be considered as extended sources. If we consider a planet as a collection of a large number of point-sized sources of light, the total variation in the amount of light entering our eye from all the individual point-sized sources will almost be zero, thereby nullifying the twinkling effect. Hence, When light from a distant source, star passes through our atmosphere, it undergoes refraction many times. When we finally perceive this light from star, it appears to be twinkling , this is because some of the light rays reach us directly and some bends away from and toward us. It happens so fast that it gives a twinkling effect.
With regards