The force between two molecules of a substance is called intermolecular force. This intermolecular force is basically electric in nature. When the distance between two molecules is greater, the distribution of charges is such that the mean distance between opposite charges in the molecule is slightly less than the distance between their like charges. So a force of attraction exists When the intermolecular distance is less, there is overlapping of the electron clouds of the molecules resulting in a strong repulsive force.
The intermolecular forces are of two types. They are:
(i) cohesive force and
(ii) adhesive force.
Cohesive force: Cohesive force is the force of attraction between the molecules of the same substance. This cohesive force is very strong in solids, weak in liquids and extremely weak in gases.
Adhesive force: Adhesive force is the force of attraction between the moelcules of two different substances. For example due to the adhesive force, ink sticks to paper while writing. Fevicol, gum etc exhibit strong adhesive property.
Water wets glass because the cohesive force between water molecules is less than the adhesive force between water and glass molecules. Whereas, mercury does not wet glass because the cohesive force between mercury molecules is greater than the adhesive force between mercury and glass molecules.