Electrochemical Theory
One way to understand the structure of metals on the basis of particles is to imagine an array of positively charged ions sitting in a negatively charged "gas" of free electrons. Coulombic attraction holds these oppositely-charged particles together, but there are other sorts of negative charge which are also attracted to the metal ions, such as the negative ions (anions) in an electrolyte. For a given ion at the surface of a metal, there is a certain amount of energy to be gained or lost by dissolving into the electrolyte or becoming a part of the metal, which reflects an atom-scale tug-of-war between the electron gas and dissolved anions. The quantity of energy then strongly depends on a host of variables, including the types of ions in a solution and their concentrations, and the number of electrons present at the metal's surface. In turn, corrosion processes cause electrochemical changes, meaning that they strongly affect all of these variables. The overall interaction between electrons and ions tends to produce a state of local thermodynamic equilibrium that can often be described using basic chemistry and knowledge of initial conditions.
Electrolysis, the joining of two (2) metals by welding or bolting, causing a positive or negative charge.





