Stars twinkle because they are point light sources. Passing through the atmosphere, the small beam of light constantly shifts by bouncing off particles in the air. Planets are closer, so they appear as discs, with the shifting of light from one side cancelling out the other.
The atmosphere of the Earth is a turbulent medium, with streams and columns of air churning around and dispersing all the time. These disturbances act like lenses and prisms that shift the light from side to side by small amounts several times a second. Since they are so far away and the beam of light is so thin, the stars appear to twinkle.