Electrolysis of aqueous salt solution of impure metal is carried out. Anode is impure metal and cathode is pure metal. Metal from anode dissolves in solution and the same amount of pure metal deposits on the cathode. More reactive metal impurities dissolve in solution and less reactive metal impurities are insoluble and form anode mud at the bottom.
Example: Electrolytic refining is used for metals like Cu,Ag,Ni,Al and Zn.