Once the can is being heated with the water inside, the water will start to boil and the gas particles will move randomly at high speeds which will collide with the walls of the container, this exerts a force, creating pressure. The particles will begin to gain more kinetic energy. So move faster and collide with the container more often and with more force. This increases the gas pressure.