When two metals are connected in an electrolyte, they will form a galvanic cell, with the higher metal in the galvanic series being the anode. The anodic will oxidize and produce an electrical current which protects the cathode from corrosion.