Why do stars flicker?

Here is a nice answer, taken from http://www.enchantedlearning.com/subjects/astronomy/stars/twinkle.shtml

The scientific name for the twinkling of stars is stellar scintillation (or astronomical scintillation). Stars twinkle when we see them from the Earth's surface because we are viewing them through thick layers of turbulent (moving) air in the Earth's atmosphere. Stars (except for the Sun) appear as tiny dots in the sky; as their light travels through the many layers of the Earth's atmosphere, the light of the star is bent (refracted) many times and in random directions (light is bent when it hits a change in density - like a pocket of cold air or hot air). This random refraction results in the star winking out (it looks as though the star moves a bit, and our eye interprets this as twinkling). Stars closer to the horizon appear to twinkle more than stars that are overhead - this is because the light of stars near the horizon has to travel through more air than the light of stars overhead and so is subject to more refraction. Also, planets do not usually twinkle, because they are so close to us; they appear big enough that the twinkling is not noticeable (except when the air is extremely turbulent). Stars would not appear to twinkle if we viewed them from outer space (or from a planet/moon that didn't have an atmosphere).

This is just a sidenote to Nijankowski's nice answer: This twinkling of stars caused by atmospheric turbulence was a major problem for the earlier reflecting telescopes when astronomers tried to look deep into the sky.

Placing the telescope over mountains solved only a part of the problem. A good solution was brought up in two ways in the 1990s. First, sending telescopes to space - Hubble Space Telescope was carried to orbit where it took astonishingly sharp images like the Hubble Deep Field due to the absence of atmosphere's interaction. Then arrived the serious flaw in its mirror. Repairing the telescope (by orbiting in space) was a very big problem as many equipments have to be replaced by service missions.

The second solution was adaptive optics. In telescopes like the Large Binocular Telescope, a secondary mirror was placed which is readily deformable and the shape is modified according to the incoming light source by a number of hydraulic pistons behind, thus correcting for some amount of atmospheric distortion.