Why do gas exert pressure?
A gas is taken into a container (as shown in the given figure). When pressure is applied on the container, the gas particles come closer to each other. This reduces the kinetic energy of the particles. However, the particles are still quite far away from each other, and are still in the gaseous state. When pressure is increased further, the gas particles come very close to each other, and consequently, the gas liquefies.
gas molecules move randomly and when they colide with something they exert pressure...... Since particles of gas have more kinetic energy than compared to any other state of matter, its particle move at high speed randomly hence, exerting preasure on the walls of a container.