Metals can be plated onto surfaces using a technique from electrochemistry called electroplating. Positively charged metal ions dissolved in a solution are attracted to a negatively charged electrode. This electrode reduces (gives electrons to) the positively charged metal ions, making them into a neutral metal species. The neutral metal is no longer soluble, so it forms a coating on the surface of the electrode.
Rechargable batteries work because the chemical reactions that occur inside them can be more easily reversed than in non-rechargable batteries.