An emerald, geologically-speaking, is a piece of beryl which has deep green coloration due to impurities within the stone. Emeralds belong to a family of beryl-based gemstones.
Beryl is a mineral with the chemical formula of Be3Al2SiO6, meaning that each molecule of beryl contains three beryllium atoms, two aluminum atoms, one silicon atom and six oxygen atoms. The deep green emerald color is due to one of the a aluminum atoms being replaced by a molecule of chromium. Beryl is naturally colorless, but the addition of chromium alters how the stone reflects light. The chromium impurities are irregularly placed throughout the crystal lattice making up the stone, so different shades of green are possible. Lighter green beryl stones are simply called green beryl. Blue pieces that are of gem quality are called aquamarine.