Ionic bonds are formed when a Cation (loss of some # of e- makes it positive) and and Anion (gain of e- makes it negative) transfer electrons to/from each other in order to form a more stable compound. They will gain/lose e- in order to have full valence shells.
Metallic bonding is different because there is an "Electron Sea" where electrons can float from one atom to another, thus allowing metals to conduct electricity.