Mass quantifies the amount of matter present in a certain object that is usually expressed in unit grams or kilograms. Unlike weight, the mass of matter or objects is not influenced by gravity thereby making the mass of something similar wherever it is placed in any location on Earth as well as on other planets having varying gravitational strengths. For example, person A might weigh 60 kg. on Earth while weighing 50 kg. on another planet having less gravitational pull. In another example, a rock having a mass of, let’s say, 10 kg. will still have the same amount of mass on other planets. Without gravity, it is safe to say that a particular matter will no longer have weight but still possess mass.
Density is a very related property but must be understood as a completely different concept from either weight or mass. Density quantifies how much mass is present in a certain matter or object with respect to volume (per unit volume). Water, for example, has a density of 1 gm/cm3. In practical applications, ships float on water, no matter how heavy they weigh, because ships still have less density as opposed to the general density of water. The ship’s volume is so great that it tends to dwarf its mass leading to a smaller density. Other substances that are denser than water will no longer float (i.e. a fist-sized hard stone).