Density is a quantitative physical characteristics of a substance or more or less stable mixture. When we take some piece or quantity of a substance, it has mass and volume. The mass divided by volume is called density, and it depends on substance only (remains the same for different pieces of the same substance).
Different substances have different density. The density of water is about `1000 (kg)/m^3,` or `1 g/(cm^3).` This means that every cubical meter of water weighs about `1000 kg,` every half of a cubical meter weighs `500 kg` and so on. So if we know what the substance is, we can compute its weight given a mass, and vice versa.
That said, density of a substance may change with temperature and pressure, sometimes significantly.