Electrorefining is a process in which a metal is extracted from its ore through the process of electro-deposition. In Electrorefining, the impure metal is taken as the anode while the pure metal is the cathode. For instance, impure copper is taken as the anode while pure copper is the cathode. The elecrolyte is a solution of sulphuric acid and copper (II) sulphate.
When current is passed, the copper at the anode gets ionized into copper(II) ions which pass through the electrolyte and get deposited at the cathode. The process of Electrorefining can last many days.
The impurities in the anode fall off into the tank. This material is known as anode slime. The anode slime contains many other elements which can be extracted through further processing.