How do geologists measure density of rocks?
For calculating density you need mass and volume,
Mass is easy: you weigh.
Volume of an irregural piece of rock can be found by submersion. You submerge the rock in a graduated vessel and find the difference between the volumes before and after.