Charles's law states that,
The volume of a given mass of an ideal gas is directly proportional to its temperature on the absolute temperature scale (in Kelvin) if pressure and the amount of gas remain constant; that is, the volume of the gas increases or decreases by the same factor as its temperature.
Which pressure should remain constant? If a theoretical gas is confined in a container with a movable piston fitted on its mouth, then we may think of the pressure being exerted from outside the piston or the pressure of the gas within the container. If we fix a piston in the mouth of a cylindrical container in such a way that the piston settles when the pressure from outside the piston is equal to that of the gas within the container, and increase the temperature, the molecules of the gas will collide more frequently with the wall of the container and also with the bottom surface of the piston, and the pressure will increase due to larger force from inside the container, and the pressure does not remain constant. I'm really confused about this phenomenon. I think the pressure which is to be constant is that from outside the piston or I do not understand it correctly.