Here's why:
* Ionic bonds: Salts are formed through ionic bonds. These bonds occur when one atom (typically a metal) loses electrons and becomes positively charged (a cation), while another atom (typically a nonmetal) gains electrons and becomes negatively charged (an anion).
* Electrostatic attraction: The oppositely charged ions are then attracted to each other due to electrostatic forces, forming a crystal lattice structure that makes up the salt.
Example: Sodium chloride (NaCl) is a common salt. Sodium (Na) loses one electron to become a positively charged sodium ion (Na+), while chlorine (Cl) gains one electron to become a negatively charged chloride ion (Cl-). These oppositely charged ions attract and form the salt.