The capillaries formed in threads disappear. The force of cohesion bw water molecules is smaller than the force adhesion bw water & cloth molecules so the cloth molecules becomes wet with water,but if a little wax is rubbed over it then the force of adhesion bw water & wax molecules becomes smaller than the cohesive force bw water molecules. So the water cannot make the cloth wet now.