Density is often confused with mass, but they are different things. Density is the mass of an object divided by its volume; in other words, how much of something has been packed into a certain amount of space. Mass refers to how light or heavy an object is. An object may be very heavy (have a high mass) but have low density because it weighs very little per unit of volume.
TL;DR (Too Long; Didn't Read)
Density is the ratio of mass to volume. Low density objects have a low mass per unit volume because they contain fewer particles.
You can’t directly measure density, and the units of density depend on the units used for mass and volume. Usually, those are g/cm3. To calculate density, first weigh the object to find its mass in grams, and then measure its volume in cubic centimeters. For example, if you have a rock with a volume of 20 cm3 and a mass of 50 g, you work out its density by 50 ÷ 20 = 2.5 g/cm3. If you have another rock with a volume of 30 cm3 and a mass of 60 g, you work out its density by 60 ÷ 30 = 2 g/cm3.
Low Density vs. High Density
In the previous examples, the second rock has a lower density even though it weighs more (has a higher mass). This proves why "lighter" and "heavier" should not be used to describe density.
Metals typically have densities above 6 or 7 g/cm3 because their particles are tightly packed, and liquids about 1.0 g/cm3 because their particles are less tightly packed than solids. Gases have a very low density because their particles are very far apart; for example, air has a density of 0.0013 g/cm3.
The Floating Test
If an object is more dense than water, it sinks, but if it is less dense than water, it floats. For example, in an oil spill in the ocean, the oil rises to the top because it is less dense than water. A piece of wood and a Styrofoam cup float in water. On the other hand, a ceramic cup and a rock sink in water because they are more dense than water. This has nothing to do with an object's mass. For example, a piece of cork weighing 10 g grams floats on water, while a much lighter piece of lead (4.5 g) sinks to the bottom because cork has a lower density than lead.