The sapphire (and ruby) are actually corundum. Like most gemstones, the corundum is a colorless mineral formed from aluminum oxide (Al2O3). As with most gemstones, coloring is the result of "impurities" found in the mineral. Titanium and iron impurities produce the sapphire's familiar blue hue. Sapphires form in feldspathoid-bearing igneous rocks under saturated with respect to silica. They can also form in recrystallized limestone and high-grade metamorphic rocks that are poor in silica and rich in aluminum. This includes marbles and some mica schists.
Sapphires have a trigonal crystalline structure with a hardness of 9. For comparison, diamonds have a hardness of 10, which makes sapphires the second hardest gemstone. Sapphire's hardness, in part, results from the strong and short oxygen-aluminum bonds. The bonds draw the atoms close, making the crystal very dense.
A gemstone is actually a crystal intrusion in igneous rock. Perfect sapphire crystals form (or grow) in a hexagonal system of bi-pyramids. Picture six-sided pyramids formed base to base. Because of weathering (usually water worn), the crystals that are found are often more barrel shaped, the points having worn off.
Minerals are solid crystalline substances that form by natural and normally inorganic processes. Minerals also have distinct chemical compositions and crystal structure. Sapphire's composition is aluminum and oxygen, formed in hexagonal bi-pyramids. But it began as disorganized atoms.
Through a complex series of chemical, phase reactions, the aluminum and oxygen atoms are tightly organized in a periodical or homogeneous fashion. From the onset, when the first atoms bond, the mineral attempts to achieve equilibrium with its environment. As such, any environmental change--a change in pressure, temperature, acidity, etc.--alters the inner organization of the forming mineral crystal. This causes flaws, structural defects and inclusions of other minerals.
The crystallization process is divided into two phases--nucleation and growth. Nucleation is that initial formation--a nucleus--from which the crystal will ultimately form. A nucleus is created from randomly scattered materials of a mineral into several joined unit cells. For a gemstone, this occurs on the surface of an impurity --titanium and iron in the case of sapphires. Growth is the process by which the mineral adds successive layers of matter--i.e., adding additional row of atoms. If the conditions for growth are not present, the nucleus can break up.
In igneous environments, pegmatites contain many rare minerals including corundum. The growth of the corundum (sapphire) oxide is helped by the fluidity of the pegmatites' gas-filled environment. In metamorphic environments, minerals are formed by solid-state transformations at temperatures and pressures different from those that formed the original mineral. Among the oxides, corundum and rutile can form. A rutile inclusion in corundum produces an asterism (the six-rayed starburst effect) in a sapphire cabochon.