Density is defined as mass per unit volume. In other words, density is the amount of matter within a given amount of space.
Water has a density of 1.0 gram per milliliter. Since one milliliter equals one centimeter squared, we could also say that water has a density of one gram per centimeter squared.
Mercury has a density of 13.6 grams per centimeter squared.
Thus, within the same volume, mercury has more mass than water. Thus, mercury has a higher density.
One reason for the differences in densities between mercury and water is that the atomic mass of mercury is 200.59 grams per mole. The atomic mass of water is 18.0 grams per mole (rounded). This is because mercury has a much larger nucleus than hydrogen or water (the atoms that make up water H2O).
Additionally, there are strong intermolecular forces (called hydrogen bonds) between water molecules. Hydrogen molecules do not stack upon one another as nicely as mercury atoms. Thus, there is additional "empty space" between the water molecules. This results in a lower mass per volume (density) for water.