The galvanic series (or electropotential series) determines the nobility of metals and semi-metals. When two metals are submerged in an electrolyte, while also electrically connected by some external conductor, the less noble (base) will experience galvanic corrosion. The rate of corrosion is determined by the electrolyte, the difference in nobility, and the relative areas of the anode and cathode exposed to the electrolyte. The difference can be measured as a difference in voltage potential: the less noble metal is the one with a lower (that is, more negative) electrode potential than the nobler one, and will function as the anode (electron or anion attractor) within the electrolyte device functioning as described above (a galvanic cell). Galvanic reaction is the principle upon which batteries are based.
See the table of  standard electrode potentials for more details.