Flaking is generally the result of poor adhesion between the ground layer and the support (canvas, wood, metal, etc.). As the ground and paint layer become brittle over time, they can no longer move with the support as it expands and contracts with environmental changes. This often results in separation of the ground layer from the support, which is referred to as "lifting and cupping". If this continues over an extended period of time, losses can occur. Poor adhesion between the ground layer and the paint layer does occur as well and is usually a result of vice inherent within the artist's materials.
Consolidation is a term that refers to the readhesion of cupping and flaking areas. A consolidant is the material used to adhere cupping and flaking areas.

Flaking paint After Consolidation and Treatment