A dog's body - just like a human's - has various types of sensory receptors in the skin, muscles and organs throughout the body. The purpose of these sensors is to report the inner and outer status to the brain (= CNS Central Nervous System). The brain then sends "messages" to activate the body's sytem in order to respond appropriately to the initial status given. It results in a constant "back and forth" between brain and body.
Beside the CNS there is the ANS, the Autonomic Nervous System which maintains all the body's vital functions automatically (heartbeat, digestion etc.). If an animal is highly stressed, the ANS sends neural messages to the receptors to lower the amount of sensation required to activate them and in turn send messages to the brain. This is vital in emergency situations - in order to flee or fight, if needed. However, due to unusual circumstances or negative experiences, many animals have had a trauma to their nervous system, resulting in a permanently low "sensation level". This constantly triggers reactions like in "emergency situations", although not applicable.
When pressure is continously applied, there is a decline in the sensivity of the receptors. While in the very beginning the dog may struggle, its nervous system experiences even, calming pressure and the dog will quickly settle into a pliable state and its guard is lowered. The adaption may vary with the intensity of the stimulus and the area of the body being stimulated, as some areas are far more sensitive than others.
(References: Sinclair D: Cutaneous Sensation. London, Oxford University Press, 1967. Lassen NA et al: Brain function and blodd flow. Scientific American 239: 62-71, 1978. Geldard FA: The Human Sense, 2nd ed. New York, John Wiley and Sons, 1972)