Each molecule in a container moves along with constant velocity in a straight line, until it hits another molecule, or a container wall. The molecules exchange momentum, but the total momentum of the two molecules is conserved. When a molecule hits a wall, it bounces back and its momentum changes. The greater the number of molecules hitting a wall, the greater is the force on the wall. The pressure in the container is the magnitude of the normal force F on a wall divided by the surface area A of the wall.