The basic unit of volume in the metric system is the liter. Volume is a three-dimensional measurement of space, determined by multiplying the lengths of the three dimensions occupied by matter. Therefore, cubic-meters can also be used as a unit of volume. One cubic-meter is equivalent to 1,000 liters.
The gram is the basic unit of mass. The volume occupied by a certain mass depends on the density of the matter. Pure water is the reference for density because one gram of water occupies one milliliter of space. Water is the only substance where the mass of the matter is equivalent to the volume.