Volume is one of the parameters for density, the other being mass. Volume measures how much space a substance occupies. Mass measures the amount of matter in the substance. Density then shows the amount of matter in a given space for a substance.
The mass of an object divided by the volume of an object equals the density of the object (mass / volume = density). Density is often presented as grams per cubic centimeter (g/cm3).
If the volume for a mass of substance is decreased, the density increases. For example, compressing a gas into a gas cylinder increases the density of the gas.
Increasing the volume of a mass of substance decreases the density. Releasing a gas from a compressed gas cylinder will decrease the density of the gas that was contained.
Changing the volume of a mass of gas is relatively simple, and gases are regarded as compressible. Liquids and solids resist changes to their volume and are considered incompressible.
If two substances are placed together, the substance with the greater density will sink below the substance with the lesser density. For example, cold water sinks below warm water and salt water below fresh water because of differences in the density of the two substances.