Specific gravity is the density of a substance relative to the density of water. For example, since the density of water at 4 degrees Celsius and 1 atmosphere is 1.000g/cm^3, specific gravity using this as the reference substance is equal to its density in grams per cubic centimeter (to four significant figures). Since specific gravity is a ratio, it does not have units; it is dimensionless.
The term "relative density" is a generalization of specific gravity, not confined to using water as the reference substance.
Specification of Pressure and Temperature
Note that both the reference and the object substance need their pressure and temperature to be specified. Calculations to three significant figures can be affected by a different of 15 degrees. For example, the density of water at 1 atm and 4 degrees Celsius is 0.999973 g/cm^3, while at 20 degrees Celsius, it is 0.998203 g/cm^3.
Specific gravity is not to be confused with specific weight, which is the weight of a substance per unit volume. In other words, it is the density of a substance times the gravitational acceleration. It has units, like density and unlike the dimensionless specific gravity.
One significance of specific gravity is to determine buoyancy. If specific gravity is above 1, then the subject substance will sink in the reference substance. If the specific gravity is less than 1, it will rise until it displaces a volume of water of mass equal to its own. (Archimedes' principle states that a submerged object is acted on by a buoyant force equal to the weight of the fluid displaced by the object.)
A Historical Misconception
This is not to say that a dense substance like iron cannot float on water. A rounded hollow iron bowl can float on water because it displaces enough water that the buoyant force of the surrounding water equals its own weight. Therefore, ships need not be made of substances with specific gravity less than 1, like wood.
A pycnometer is used to measure the specific gravity of a fluid. It has a capillary tube in the stopper, to remove the effect of surface tension on the volume measurement. In fact, since both water and the subject substance are measured in the same pycnometer, volume never need be known, which also improves accuracy.