Matter is defined as anything that takes up space (has volume) and has mass. Density relates to how much mass of a material is in a given amount of volume (density = mass/volume). That is if you take the amount of mass of an object and divide that by its volume, you have density! The more massive an item is in relation to its size, the more dense it. In other words, to say that something is dense is to say that it is comparatively heavy for its size.
Density is expressed in grams per cubic centimeter (g/cm3). Water is used as a standard measure of density; water has a density of 1 gm./cm3. If a substance has a density greater than 1 gm./cm3 it will sink in water. If its density is less than 1 gm./cm3 it will float in water. Pine wood has a density of 0.5 g/cm3; gold's density is 19.3 g/cm3. Pine floats; gold sinks.
Water's density changes with the addition of some materials, such as salt, or with changes in temperature.