The term molecule is only valid for covalent compounds; in other words, compounds whose atoms are bound by covalent bonds. In covalent compounds (e.g. geodome's example, HCl), discrete units (i.e. molecules) of HCl exist. However, for ionic compounds (e.g. NaCl, table salt), the Na+ and Cl- are arranged in a crystal lattice. In this lattice, there are no discrete "molecules" of NaCl, just an array of ions arranged in a repeating pattern.