The molecules of a gas are in constant random motion. The temperature of the gas is related to the average kinetic energy of the molecules. The higher the temperature, the greater the average kinetic energy and so the faster the average speed of the molecules