The metric unit for density is kilogram per meter cubed, and the smaller unit is grams per centimeter cubed. Density is defined as the ratio of mass per unit volume of a substance.
Density shows how compact atoms, molecules and ions are in a substance. The density of solids is highest when liquids have lower densities. Gases have the lowest density, as the atoms and molecules in a gas are not tightly bound together.
Density of a substance depends on temperature and pressure. At lower temperatures, molecular and atomic motion slows down, causing them to become more compact. This causes substances to have higher densities at lower temperatures. The only anomaly is water, which has its highest density at 4 degrees Celsius. So the density of water in the solid state is actually lower than in the liquid state. This is why ice floats on water.