The pressure and temperature of a gas are linked. As pressure goes up and down, so does temperature.
Take a container that has a fixed amount of gas. A plunger seals one end of the container. A pressure gauge is attached, and a thermometer. Pushing in the plunger increases gas pressure. It forces the gas molecules into a smaller space. As a result, they move faster and make more impacts. This causes the gas to heat up. And the overall temperature of the gas rises too. An increase in pressure produces a rise in temperature.
Pulling out the plunger reduces gas pressure. It gives the molecules more room to move. They make fewer impacts. The energy level of the molecules falls. And so does the temperature of the gas. A fall in pressure produces a fall in temperature. Now let’s see what happens when it is temperature that changes first.
When a gas is heated up, its molecules gain energy and start to move more quickly. They make more impacts. This increases the pressure the gas is exerting. Increasing the gas temperature produces increased pressure.
Cooling has an opposite effect. The particles lose energy and slow down. They make fewer impacts. Pressure falls.
So, for a fixed amount of gas, higher temperatures produce higher pressures. And lower temperatures produce lower pressures.
This is put to use in compression-ignition or diesel engines. Air in the combustion chamber is highly compressed by the piston. This causes such a large rise in air temperature that when fuel is sprayed into it, the mixture ignites.