In ionic compounds, a metal atom loses an electron, forms a cation, and another nonmetal atom gains it, creating an anion. Thus, there is a complete transfer of electrons between the two atoms. The ions are part of a fixed crystal lattice and immobile in the solid state. For example, NaCl, KBr.

In covalent compounds, two nonmetals share their valence electrons to attain a stable outer electronic configuration of a duplet or an octet. Due to sharing of their electrons, they are not charged ions and are neutral compounds. They may be polar or nonpolar compounds—for example, H2, CH4, and HCl.

A metallic bond is a type of chemical bond seen only in metals. For example, Na, K, Ca. Metals have large sizes; therefore, the positive nuclear charge cannot effectively hold its outermost negatively charged electrons. The metals easily lose these electrons and become positive kernels. These positive kernels try to attract electrons, not necessarily their own, again electrostatically.

The lost electrons drift freely in the solid structure, ready to attach to other kernels. So, one atom's valence electrons become available to a bulk of metal atoms. The attractive electrostatic interaction between the kernels and valence electrons results in a binding force known as the metallic bond.
Therefore, the metallic bond is unlike the ionic and covalent bond.
In a metallic bond, the kernels are at fixed distances, the electrons freely float in the solid structure, like islands in an ocean. The metal atom maintains its electrical neutrality by the electrostatic attraction between the kernel and the electrons.

This excerpt supports the chapter Bonding in Atoms, part of CurlyArrows' Introduction to Organic Chemistry Course. Preview the Book.
Related Reading- Metallic Bond
