The ideal gas law relationship between pressure, temperature, volume, and number of atoms can be demonstrated using a piston. As the volume of the cylinder decreases under constant temperature and number of atoms, the pressure increases due to the increased rate of collisions against the wall of the cylinder. We now lock the piston to create a constant volume and number of atoms. Increasing the temperature results in increased kinetic energy for the atoms. The result is an increase in both temperature and pressure.
Removing the heat source allows the kinetic energy of the atoms to dissipate to the surroundings, and the system returns to original conditions. With pressure and temperature held constant, additional atoms can be added to the cylinder. This results in an increased volume in the cylinder.
If we double the number of atoms, the volume will double under these conditions.