Gasses have particles that have a lot of energy. Because of this energy they bounce off of each other and spread out to take the shape and volume of their container. Air contains invisible water particles in the form of a gas.
Liquids have particles that have more energy than solids but less than gases. The particles are close enough to still be attracted to each other, but have enough energy to move around. Because of this, liquids take the shape of their container. The particles do not have enough energy to break their attractions completely, so they do not spread out and take the volume of their container.