Gases also expand when they are heated and contract when they are cooled. The molecules of a hot gas move faster than the molecules of a cold gas, so they hit each other harder and bounce harder off the sides of a container. This makes the molecules move farther apart and push the sides of a container outward.