Metals high up in reactivitv series are extracted by electrolytic reduction.
While those in the middle are extracted first by converting into oxide and then reducing by carbon.
Same method cannot be used because metals have more affinity for oxygen than carbon.
Molten sodium chloride is taken for electrolytic reduction. The metals are deposited at the cathode and chlorine is liberated at anode.
At cathode : Na+ + e-→ Na
At anode : 2Cl-→ Cl2 + 2e-