Matter exists in three states: solid, liquid and gas. The molecules in all matter are in constant motion, and in a gas they are held together so loosely that they can move freely. Gas molecules move about rapidly and at random. This means that a gas will expand to fill any space it occupies. The molecules in a gas press against anything that restrains them, causing pressure. As a gas is heated, the molecules move further apart and move about more rapidly. If it is restricted in a container, the pressure will increase. If any gas is cooled sufficiently, it will condense into a liquid. This is why some of the outer planets of the solar system are composed of liquid methane and hydrogen.

Picture credit: google