On the basis of kinetic theory of gases, the gas exerts pressure because its molecules:
Are attracted by the walls of container
Continuously stick to the walls of container
Continuously lose their energy till it reaches wall
Suffer change in momentum when impinge on the walls of container