Molecule is the general term used to describe any atoms that are connected by chemical bonds.
Every combination of atoms is a molecule. A compound is a molecule made
of atoms from different elements.
Well, if a molecule is considered to be a discrete small unit made up of atoms joined
together, then NaCl, and any other ionic solid is not really a molecule. In NaCl we have a
repetitive crystal structure in which each Na+ ion is surrounded by Cl-
ions, and vice-versa, for as far as the crystal extends. There really isn't such a thing
as an NaCl molecule.