Density of an object basically means how tightly the matter of the object is packed together. 
It can also be defined as mass per unit volume.

Density = Mass ÷ Volume
⍴ = m ÷ V

The unit of density is kg/m³ or g/cm³


Example:
A rock weighing 0.6 kg has a volume of 15 cm³. What is its density?

Solution:
Since the mass is given in kilograms, we need to convert it into grams.
Mass = 0.6 kg = 600 g
Volume = 15 cm³
⍴ = 600 ÷ 15 = 40 g/cm³


Example:
A cuboidal block of glass has dimensions 1m x 60 cm x 2 m. It weighs exactly 2 kg. What is its density?

Solution:
Dimensions of the block = 1 m x 0.6 m x 2 (convert 60 cm to 0.6 m)
Since the block is cuboidal, we can use the formula: (l x b x h) to find the volume. 

Volume = (1 x 0.6 x 2 )= (2 x 0.6) = 1.2 m³
Mass = 2 kg
⍴ = (2 ÷ 1.2) = 1.66666… = 1.67 kg/m³