Density and viscosity
Density compares an object's mass to its volume, and viscosity compares how easily a fluid flows; a fluid can be dense without being viscous, or the other way around.
A worked example
A block with a mass of 180 g and a volume of 90 cm3 has a density of 180 / 90 = 2 g/cm3. Since water's density is about 1 g/cm3, the block sinks.
The mistake people actually make
Density and viscosity are different properties. Cooking oil is less dense than water, so it floats on water, yet it pours far more slowly than water because it is more viscous.