Rubies and sapphires are forms of corundum. Corundum is a crystallized form of aluminum oxide (Al2O3) The "2" and "3" in the formula are meant to be subscripts, representing two molecules of aluminum bonded to three of oxygen. It has a hexagonal (6-sided) crystal structure and is extremely hard; it can be cut into jewelry quality gems.
Corundum is a mineral found in various types of rocks, mostly igneous. It can also be created artificially. Corundum has a variety of industrial uses as it is so hard and tough. It is used as an abrasive (such as on emory boards), in the past as the "jewels" in watch mechanisms, and currently to produce lasers, clear covers for price scanners, and watch crystals. It is also very heat-resistant, and is used to make kiln pieces.