Aluminum is present in most rocks and is the most abundant metallic element in the earth's crust (eight percent by weight.) However, its isolation is very difficult and expensive to accomplish by purely chemical means, as evidenced by the high E° (–1.66 v) of the Al3+/Al couple. For the same reason, aluminum cannot be isolated by electrolysis of aqueous solutions of its compounds, since the water would be electrolyzed preferentially. And if you have ever tried to melt a rock, you will appreciate the difficulty of electrolyzing a molten aluminum ore! Aluminum was in fact considered an exotic and costly metal until 1886, when Charles Hall (U.S.A) and Paul Hérault (France) independently developed a practical electrolytic reduction process.
The Hall-Hérault process takes advantage of the principle that the melting point of a substance is reduced by admixture with another substance with which it forms a homogeneous phase. Instead of using the pure alumina ore Al2O3 which melts at 2050°C, it is mixed with cryolite, which is a natural mixture of NaF and AlF3, thus reducing the temperature required to a more manageable 1000°C. The anodes of the cell are made of carbon (actually a mixture of pitch and coal), and this plays a direct role in the process; the carbon gets oxidized (by the oxide ions left over from the reduction of Al3+ to CO, and the free energy of this reaction helps drive the aluminum reduction, lowering the voltage that must be applied and thus reducing the power consumption. This is important, because aluminum refining is the largest consumer of industrial electricity, accounting for about 5% of all electricity generated in North America. Since aluminum cells commonly operated at about 100,000 amperes, even a slight reduction in voltage can result in a large saving of power.
The net reaction is
2 Al2O3 + 3 C → 4 Al + 3 CO2