The molecules of a gas are in constant random motion. They move in straight lines until they collide with each other or with the walls of the container, and then they change direction. Each collision with a wall pushes on it with a tiny force. Billions of these collisions every second add up to the pressure that the gas exerts.
The temperature of a gas is related to the average kinetic energy of its molecules. The hotter the gas, the greater the average kinetic energy, so the molecules move faster on average. A cooler gas has molecules with less kinetic energy that move more slowly.
Now keep the volume of the gas fixed, for example in a sealed rigid container, and change its temperature. If the gas is heated, the molecules move faster, so they hit the walls more often and with more force. The pressure increases. If the gas is cooled, the molecules move more slowly, they hit the walls less often and with less force, and the pressure decreases.