Assuming that by molecule you are talking only about covalent molecular compounds you need to look at the nature of the covalent bonds and the molecular shape. This is an extremely broad topic but basically : non-polar molecules will be attracted by London dispersion forces, polar molecules will be attracted by dipole-dipole interactions, and polar molecules with N-H, O-H and F-H will be attracted by the strongest dipole-dipole interactions called hydrogen bonds.
Easiest are molecules that contain only non-polar covalent bonds. Examples are the diatomic elements - hydrogen gas, oxygen gas, nitrogen gas, and the halogens. These molecules are only attracted to each other by weak London forces between electrons in one molecule and the positive nuclei of the other. The bigger the mass of the molecule, the stronger these forces are. This is why the halogens go from gases (fluorine, chlorine) to liquids (bromine) to solids (iodine) at room temperature. Strong attractions mean higher melting points.
If the molecule contains two or more different types of atoms, then the covalent bonds will have some degree of polarity. The polarity of the bond results in an unequal sharing of the electrons due to differences in the bonding elements' electronegativities. This creates an asymmetrical distribution making the more electronegative element partially negative and the less electronegative partially positive. These partial charges are called dipoles.
To determine if a molecule is polar, you need to identify the direction of the dipoles for each of the bonds present and the overall geometry of the molecule (VSEPR theory). In symmetrical molecules, polar bonds cancel each other out making the molecule non-polar overall. Good examples of this are
A molecule like
In molecules like water, the molecule is polar (the negative end is the oxygen, the positive end is the hydrogens) and because the bonds are so polar, the hydrogen is essentially a bare proton which is strongly attracted to the lone pairs of electrons on the oxygen atoms in adjacent molecules. This is the strongest dipole-dipole interaction - hydrogen bonding.