A molecule is a particle made up of two or more atoms that are chemically bonded together; the number of atomic nuclei making up a molecule is a determinate number.
For example, HCl(g) is a molecule made of one hydrogen atom bonded to one chlorine atom. It is made of two atoms and is called a diatomic molecule.
A crystal of NaCl(s) is not a molecule: it is an ionic lattice made up of an indeterminate number of atoms.
Carbon dioxide is a molecule made of two oxygen atoms bonded to a carbon atom. It contains three atoms and is called a triatomic molecule.
Silicon dioxide - best known as quartz - exists as an large covalent network made up of an indeterminate number of atoms.
One of the most abundant triatomic molecules in the universe is the trihydrogen cation H3+. Although plentiful in space, where it is stabilized by the very low temperature and the low density of matter, the trihydrogen cation is rare on Earth.
Very large molecules exist; they are known as macromolecules. An example of a particularly large macromolecule is DNA, which contains hundreds of billions of atoms.
One way to categorize molecules is whether they are homonuclear, made of only one element, such as H2, O2, O3, N2, P4, and S8; or heteronuclear, made of more than one element, such as CH4, NO2, CO, PCl5, and C6H12O6.
Whether a substance made of molecules is solid, liquid, or gas at room temperature is determined by the molecules' molar mass and the strength of electrostatic attraction between molecules.
Low molar mass molecules, such as H2 and CH4, tend to form gases.
Strong electrostatic attraction between molecules can have a significant effect.
For example, H2O molecules have a similar molar mass to CH4 molecules. Water boils at 100 °C and methane boils at -161.5 °C.
The large difference in boiling points arises from the electronegativities of hydrogen and oxygen producing a dipole in the water molecule. Water is a polar molecule; its hydrogen atoms have a permanent slight positive charge; its oxygen atom has a permanent slight negative charge.
The result of these permanent charges is strong, relatively long-lived polar bonding between individual water molecules, leading to an unexpectedly high boiling point for a substance whose molar mass is low.
There is only van der Waals bonding between methane molecules, forming much weaker associations between molecules than polar bonding does. Van der Waals bonds form when relative electron vs nucleus positions in different molecules temporarily produce a fleeting electrostatic attraction between them.