When most metals are exposed to oxygen they will react to form metal oxides, as oc=xygen is abundant most metals on earth will have been oxidised. Apart from really unreactive metals like gold.
The cheapest way to separate our metal oxides is with carbon
Carbon will take the oxygen from the metal to from carbon dioxide and leave a pure metal
Unfortunately, we can only do this with metals that are less reactive than carbon.