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 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).
The following is the galvanic series for stagnant (that is, low oxygen content) seawater.
The unshaded bars indicate the location on the chart of those steels when in acidic/stagnant water ( like in the bilge ), where crevice-corrosion happens.
Notice how the *same* steel has much different galvanic-series location, depending on the electrolyte it's in, making prevention of corrosion .. more difficult.