The fact is "starts do not twinkle". But it is just an optical illusion. Stars continuously emit light. These light travels through various layers of earth atmosphere before they reach our eyes. Now refractive index decreases as we move from down through atmosphere. So light keeps on getting bent towards normal at each point of incidence. Practically there are infinite points of incidence as refractive index keeps changing as we move down. This happens in accordance to .......Finally light reaches our eye. So we see the star at B but actual position of star is at A.
Further atmospheric conditions keeps on changing. Hence light flux reaching our eyes keeps varying and so star appears bright at some time and it appears fade at other. So starts apparently twinkles but practically they don't.