Work is the transfer of energy by a force. When a force moves something, energy is transferred to it.
Doing work on a gas increases the internal energy of the gas. The internal energy is the total of the kinetic and potential energy of all the molecules. For a gas, the energy transferred to the molecules makes them move faster, so their average kinetic energy goes up. Because temperature is related to the average kinetic energy, the temperature of the gas can rise.
A bicycle pump shows this. When you push the handle, a force moves the piston and does work on the air trapped in the barrel. Energy is transferred to the air, the molecules move faster and the air becomes warmer. The barrel of a pump that has been used for a while feels warm for this reason.