Molecules of a gas in a container are in a continuous state of random motion in all direction.During their motion, they all the time collide with each other and with the walls of the comtainer.Gas molecules colliding with the walls of the container and thus produced pressure.