The ability to convert between units of mass, density, and volume is one of the fundamental skills necessary to solve basic problems in physics and chemistry. Mass, in the SI system of units used by default worldwide in solving such problems, has units of kilograms (kg) and derivations thereof, whereas volume has units of meters cubed, or m3, the meter being the SI unit of length. Correspondingly, density, which is mass per unit volume, is often expressed in kg/m3. Because quantities are often smaller in everyday experiments and measurements, it is typical to see density expressed in g/cm3, or gm/ml (a milliliter is defined as a cubic centimeter). One kg/m3 is equal to 1,000 g/cm3.
TL;DR (Too Long; Didn't Read)
Use the expression:
m = ρV
To convert from m3 in volume (V) to mass (m) in kilograms. Density (ρ) varies for different substances so you'll need to look this up for the substance in question to complete the calculation.
Deriving Mass from Volume
Say you are given a known volume of a substance (water or some other fluid, a metal, or anything else assumed to have a uniform or near-uniform distribution of matter) and asked to calculate its mass. To do this, based on the relationships established above, you must know the substance's density and only its density.
Since density (ρ) is mass (m) divided by volume (V), then mass equals density times volume:
ρ = m/V
m = ρV
Densities in the Real World
Various online tables include the densities of common substances. For example, plain water at a temperature of 4 °C has a density of 1,000 kg/m3 or 1 g/ml, again by definition. Oils are less dense than water, which is why the oil component of a salad dressing like Italian floats to the top of the mixture. Milk, which is composed almost entirely of water but includes sugars, protein, and (usually) fats, has a density of 1.03 times that of water.
Metals are as a rule notably more dense than liquids, and vary greatly from one to the next. Gold, for example, has a density of 19.3 g/ml. This means that 1 m3 of gold has a mass of 1,000 x 19.3 = 19,300 kg. Since 1 kg = 2.204 lb, a portion of gold one meter by one meter by one meter (about the size of a smallish table) would have a mass of 42,537 pounds, in excess of 21 tons.
Since a modern seafaring ship is made primarily of metal, how does it float? For something to float in water, it must have less mass than the water it displaces. This is accomplished as a result of all of the empty space included in the ship's construction, such as the space between layers of a ship's hull. When a metal boat such as a canoe is placed in water, it begins to sink because solid metal is what first contacts the water. But because the overall density of the canoe is less than that of an equivalent volume of water, even with one or two passengers added, most of it remains above the water's surface.