Muscle spindle

Muscle spindles are stretch receptors within the body of a skeletal muscle that primarily detect changes in the length of the muscle. They convey length information to the central nervous system via afferent nerve fibers. This information can be processed by the brain as proprioception. The responses of muscle spindles to changes in length also play an important role in regulating the contraction of muscles, for example, by activating motor neurons via the stretch reflex to resist muscle stretch.
The muscle spindle has both sensory and motor components.
Structure.
Muscle spindles are found within the belly of a skeletal muscle. Muscle spindles are fusiform (spindle-shaped), and the specialized fibers that make up the muscle spindle are called intrafusal muscle fibers. The regular muscle fibers outside of the spindle are called extrafusal muscle fibers. Muscle spindles have a capsule of connective tissue, and run parallel to the extrafusal muscle fibers.
Composition.
Muscle spindles are composed of 5-14 muscle fibers, of which there are three types: dynamic nuclear bag fibers (bag1 fibers), static nuclear bag fibers (bag2 fibers), and nuclear chain fibers.
Primary type Ia sensory fibers (large diameter) spiral around all intrafusal muscle fibres, ending near the middle of each fibre.
Secondary type II sensory fibers (medium diameter) end adjacent to the central regions of the static bag and chain fibres.
These fibres send information by stretch-sensitive mechanically-gated ion-channels of the axons.
The motor part of the spindle is provided by motor neurons: up to a dozen gamma motor neurons also known as "fusimotor neurons". These activate the muscle fibres within the spindle. Gamma motor neurons supply only muscle fibres within the spindle, whereas beta motor neurons supply muscle fibres both within and outside of the spindle. Activation of the neurons causes a contraction and stiffening of the end parts of the muscle spindle muscle fibers.
Fusimotor neurons are classified as static or dynamic according to the type of muscle fibers they innervate and their effects on the responses of the Ia and II sensory neurons innervating the central, non-contractile part of the muscle spindle. 
Efferent nerve fibers of gamma motor neurons also terminate in muscle spindles; they make synapses at either or both of the ends of the intrafusal muscle fibers and regulate the sensitivity of the sensory afferents, which are located in the non-contractile central (equatorial) region.
Function.
Stretch reflex.
When a muscle is stretched, primary type Ia sensory fibers of the muscle spindle respond to both changes in muscle length and velocity and transmit this activity to the spinal cord in the form of changes in the rate of action potentials. Likewise, secondary type II sensory fibers respond to muscle length changes (but with a smaller velocity-sensitive component) and transmit this signal to the spinal cord. The Ia afferent signals are transmitted monosynaptically to many alpha motor neurons of the receptor-bearing muscle. The reflexly evoked activity in the alpha motor neurons is then transmitted via their efferent axons to the extrafusal fibers of the muscle, which generate force and thereby resist the stretch. The Ia afferent signal is also transmitted polysynaptically through interneurons (Ia inhibitory interneurons), which inhibit alpha motorneurons of antagonist muscles, causing them to relax.
Sensitivity modification.
The function of the gamma motor neurons is not to supplement the force of muscle contraction provided by the extrafusal fibers, but to modify the sensitivity of the muscle spindle sensory afferents to stretch. Upon release of acetylcholine by the active gamma motor neuron, the end portions of the intrafusal muscle fibers contract, thus elongating the non-contractile central portions (see "fusimotor action" schematic below). This opens stretch-sensitive ion channels of the sensory endings, leading to an influx of sodium ions. This raises the resting potential of the endings, thereby increasing the probability of action potential firing, thus increasing the stretch-sensitivity of the muscle spindle afferents.
How does the central nervous system control gamma fusimotor neurons? It has been difficult to record from gamma motor neurons during normal movement because they have very small axons. Several theories have been proposed, based on recordings from spindle afferents. 
Development.
It is also believed that muscle spindles play a critical role in sensorimotor development.
Clinical significance.
After stroke or spinal cord injury in humans, spastic hypertonia (spastic paralysis) often develops, whereby the stretch reflex in flexor muscles of the arms and extensor muscles of the legs is overly sensitive. This results in abnormal postures, stiffness and contractures. Hypertonia may be the result of over-sensitivity of alpha motor neurons and interneurons to the Ia and II afferent signals.