Here is my explanation after 30+ years working as a geotechnical engineer. Note that this discussion is for piles with only static loads or very small cyclic loads relative to their static capacity. Piles subjected to cyclic loads are a complete different beast and should be designed very carefully.
Piles, regardless of the soil and/or rock in which they bear, are generally designed as either friction piles or end bearing piles. In this thread we are only talking about friction piles.
Friction piles develop their load capacity based on resistance along the sides of the pile, i.e. capacity is related to the side area of the pile. The side resistance usually changes with depth depending on soil type and one or more of the following: groundwater level or levels, soil strength, and over burden pressure.
In sands the side resistance is calculated, in almost all cases, is based on the friction between sand and the pile. This resistance is normally based on the strength (phi angle) of the sand and the effective over burden pressure at a given depth. Therefore the side resistance changes both with soil strength and depth. Most piles bearing in sand are designed as friction piles and settlement is rarely a problem.
In clays the side resistance is calculated based on the interaction between the clay and the pile. This resistance is generally related to the undrained shear strength (cohesion) of the clay and the value of the interaction is often termed adhesion. The adhesion cannot be greater than the cohesion and there are many methods/opinions on what is the correct/appropriate relationship between cohesion and adhesion. Generally the overburden pressure has only a small impact on the resistance in clays, at least the way the resistance is typically calculated. Piles are rarely founded in soft or medium stiff clays and settlement can be a problem and should always be considered.
Soil conditions with both sand and clay require careful consideration since the different stiffnesses in the different soil layers can really affect where the load goes and how the piles behave.
Mike Lambert