There are a number of different ways in which fabrics can shrink, and each has its own causes. Common types of fabric shrinking are felting shrinkage, relaxation shrinkage and consolidation shrinkage. These shrinkages are often caused by different combinations of changes in temperature, moisture and mechanical movements in the fabric. The material of a given fabric helps determine what will cause it to shrink.
Animal hair, such as wool, typically has scale-like structures on the surface of the hair. When moisture is present along with heat, the scales can compress. This causes the scales to mesh together more tightly, leading to a tightening of the cloth, and therefore the material shrinks. Certain types of clothes, especially sweaters, often shrink in this way.
Relaxation shrinkage is caused primarily by liquids. When certain types of fabrics are placed in water, the fibers relax and absorb the liquid. This causes the fibers to swell and forces them closer together. Usually, relaxation shrinkage does not result in as great a change in size as other types of fabric shrinking.
Consolidation shrinking is caused by the combination of heat, moisture and movements like washing agitation. The culmination of these three things releases the fabric's tension and warps it.