The pressure exerted by the gas is because of:
particles of gas hitting the walls of the containers.
Since particles of a gas move in every possible direction, they continuously collide with other particles and also with the walls of the container.
When the particles hit the wall, they exert a force on the wall of the container. This force, when divided by area, gives pressure.