The forces that hold different atoms together are intramolecular forces called bonds. Additionally, there are interactive forces between atoms of different molecules, like the van der Waals force, but these are much weaker than bonds.
There are two primary types of chemical bonds: covalent and ionic. An ionic bond occurs when one atom donates one of its outer electrons to the other atom. These bonds occur between two metal atoms or one nonmetal and one metal atom. Covalent bonds are typically formed between two nonmetal atoms. In a covalent bond, two atoms share one or more of their outer electrons in order to maintain stability.