The air in the atmosphere is turbulent. That means there are different layers of air with different temperatures; some hot, some cooler. Hot air is less dense than cooler air. The light of the stars bends when it goes from a less dense part of the atmosphere to a denser one. Think about a straw in a glass of water. The straw seems to bend when it enters the water, but actually light is bending as it goes from one medium (air) to another (water). This behavior of light is called refraction.
Little packets of air, called cells, move around in the atmosphere. Starlight bends a little each time it goes through one of these cells. When you see a star from the ground, its light has crossed hundreds of cells in the sky, refracting in random directions - so the image of the star appears to jump!