Overview
Escape reflex, or escape behavior, is any kind of escape response found in an animal when it is presented with an unwanted stimulus. It is a simple reflectory reaction in response to stimuli indicative of danger, that initiates an escape motion of an animal. The escape response has been found to be processed in the telencephalon. Escape reflexes control the seemingly chaotic motion of a cockroach running out from under a foot when one tries to squash it.
In higher animals, examples of escape reflex include the withdrawal reflex (e.g. the withdrawal of a hand) in response to a pain stimulus. Sensory receptors in the stimulated body part send signals to the spinal cord along a sensory neuron. Within the spine, a reflex arc switches the signals straight back to the muscles of the arm (effectors) via an intermediate neuron (interneuron) and then a motor neuron; the muscle contracts. There often is an opposite response of the opposite limb. Because this occurs automatically and independently in the spinal cord, the brain only becomes aware of the response after it has taken place.
Crossed extensor reflex
The crossed extensor reflex is another escape reflex, but it's a type of withdrawal reflex. It is a contralateral reflex that allows for the affected limb to have the flexor muscles contract and the extensor muscles to relax while the unaffected limb has the flexor muscles relax and the extensor muscles to contract. For example, stepping on a piece of glass causes the affected leg to be lifted or withdrawn and the unaffected leg to carry the additional burden of weight and maintain postural support. In this example, the afferent nerve fibers are stimulated on the right foot. The nerve fibers travel up to the spinal cord where they cross the midline, go to the left side, and synapse on an interneuron. When the afferent nerve fibers synapse on the interneuron, they can either inhibit or excite an alpha motor neuron on the muscles on side contralateral to the stimulus.
From Wikipedia (CC BY-SA 4.0).