Stars twinkle due to atmospheric refraction of starlight. As the stars are very away they behave as almost point sources of light. As on account of atmospheric refraction, the path of rays of light coming from the star goes on varying slightly, the apparent position of the star fluctuates and the amount of light entering the eye flickers, so sometimes the star appear brighter and at some other time, fainter. Thus the stars twinkle.