ionic bonds : ionic bonds are formed between metals and non-metals as the transfer of electrons from metal to non-metal allows both to have fully-filled valence shells and to achieve a stable electronic configuration.
covalent bonds: covalent bonds are formed between non-metal and non-metal as atoms share their valence electrons so that both get a full valence shell and achieve a stable electronic configuration