Ionic bonding occurs when atoms transfer electrons to form ions with opposite charges that are attracted via electrostatic forces. Metals form cations by losing electrons to achieve stable electron configurations like noble gases, while nonmetals form anions by gaining electrons. This transfer of electrons allows the formation of ionic compounds with crystalline structures where ion attractions are maximized and repulsions minimized. Properties of ionic compounds include high melting points, solubility in water, defined crystal structures, and the ability to conduct electricity when molten. Metallic bonding also involves cations but is characterized by delocalized valence electrons that form a "sea" allowing metals to conduct electricity and be malleable and ductile.