Why does paint dry on the wall but does not harden when in the tin?

There are two basic mechanisms by which paints dry on the wall.

Many modern paints are largely water-based. As we know, water readily evaporates. However, the rate of evaporation of a liquid depends on the vapour pressure of that liquid above the surface. In a sealed tin of paint, a set vapour pressure is quickly established in the small headspace in the tin and the water in the paint does not evaporate and remains in the paint. But, when painted on the wall, the water can readily evaporate to leave a dried film of solid paint components behind – there is no build-up of water vapour pressure in a confined space as there is in the tin.

Other paints, especially those manufactured some time ago, are by contrast largely oil-based. Unlike water, the oil does not evaporate. These paints dry on the wall in a very different way, through a chemical reaction with the oxygen in the air. This causes the relatively small molecules in the oil to form much larger molecules which have a solid rather than liquid form (i.e. polymers are formed). In the sealed tin, oxygen is not available for this chemical reaction to occur, and the oil remains in its original, fluid (smaller molecule) form.

These two distinct mechanisms account for the contrasting behaviour of paints in a sealed tin and on a wall.