* Hydrogen chloride (HCl): HCl is a covalent compound. This means the hydrogen and chlorine atoms share electrons to form a stable bond. The shared electrons create a molecule, a discrete unit of two or more atoms held together by covalent bonds.
* Sodium chloride (NaCl): NaCl is an ionic compound. This means sodium (Na) loses an electron to become a positively charged ion (Na+), and chlorine (Cl) gains that electron to become a negatively charged ion (Cl-). These oppositely charged ions attract each other electrostatically, forming a crystal lattice. There are no discrete molecules in an ionic compound – it's a continuous, repeating array of ions.
In summary:
* Molecules are formed by covalent bonds, where atoms share electrons.
* Ionic compounds are formed by electrostatic attractions between oppositely charged ions, and don't form discrete molecules.
Therefore, HCl is correctly called a molecule, while NaCl is not.