Charles law states that the temperature (in Kelvin) of an ideal gas is directly proportional to the volume it occupies if the pressure and mass (amount of gas) remain constant within a closed system.

I am confused on how pressure can remain constant within a closed system? Can anybody help explain it to me and maybe also provide an example to also help me understand?