Ideal gas law says that $pV = nRT$. So with compression, one way to add pressure which makes the volume smaller, can you actually increase the temperature?
It does not make sense to me that you can increase temperature, that is, add to the kinetic energy of the molecules, simply by increasing pressure, pressure meaning the force exerted on the gas from its surroundings. Can someone please explain this contradiction?