Density is defined as the mass per unit volume of a substance.
A substance having a density greater than that of water will sink in it, for example, a piece of iron or aluminium. While, a substance which is less dense than water will float in it, for example, wood, cork or cotton.