When a component made up of atoms that readily shed electrons (a metallic) reacts with a component made up of atoms that quickly obtain electrons (a nonmetal), a transfer of electrons usually takes place, producing ions. The compound formed by this transfer is stabilized via the electrostatic attractions (ionic bonds) https://franciscoxzvsl.theisblog.com/29887848/considerations-to-know-about-potassium-cyanide-kya-kaam-karta-hai