The particles of a gas are in constant random motion at high speed.
This random motion results in the collisions of particles among themselves and with walls of the container.
When these randomly moving particles collide with the walls of the container, they exert a force per unit area on the wall of container resulting in pressure.