In the context of movement, a compensatory mechanism is a natural action that happens, either consciously or unconsciously to maintain a motor pattern.   One body part acts in a different way, (compensates for a weakness in another part or process) to remove some of the task's burden from other body parts.
 
Limping is a compensatory mechanism.  Allowing one resource (your good leg), to support more weight in each step than normal, because the other leg (the bad leg) hurts..Another example is switching sides while carrying heavy luggage, moving the burden from one arm to the other, while carrying heavy luggage. 
 
Repeated habitual compensatory mechanisms may lead to injury, such as when the task demands are greater than the resources allocated.