When wax is rubbed cloth, the cloth becomes water proof. Why?

cbse
propertiesoffluids

#1

The capillaries formed in threads disappear when wax is rubbed on cloth.