Why does gas heat up when compressed? Why do the molecules move faster?
Heat is energy. So moving faster is kinetic energy. Imagine a cylinder of gas with a piston, where the atoms are bouncing off the cylinder and exerting pressure on it. The cylinder isn’t moving, so the net energy change of the gas is zero. Now you start to push the cylinder, and since the speed of each atoms bouncing off the wall is now higher than it was when it was heading towards the wall, that atom has a higher energy, heat, etc. Thus, compressing the cylinder heats the gas. In reality there will be billions of these collisions, each atom increasing in energy only a small amount.