stretch reflex
A stretch reflex is your body's automatic push-back when a muscle is suddenly pulled longer than it wants to be: the very same muscle clenches right back, all on its own, to resist the stretch. The classic example is the knee-jerk a doctor produces by tapping just below your kneecap with a small rubber hammer. That tap briefly stretches the big muscle on the front of your thigh, and a fraction of a second later that muscle contracts and your lower leg kicks out, with no thought or decision on your part. It is one of the fastest, simplest reactions the nervous system can make.
It works because every muscle is threaded with tiny stretch detectors called muscle spindles. When a stretch yanks the muscle, these spindles fire off a signal that races up a sensory nerve to the spinal cord. There it hands the message directly to a motor nerve, which immediately orders that same muscle to contract, with no detour up to the brain to decide. Because the loop turns around in the spinal cord instead of climbing all the way to the brain, the response is almost instantaneous. The brain hears about the kick only after it has already happened.
The point of all this is to keep your muscles at a steady, useful length without you ever thinking about it. When you stand still and your knees start to buckle, the leg muscles that suddenly stretch fire their stretch reflex and stiffen back up, helping you stay upright. The hammer-tap test doctors use is really just a quick way to check that this whole sensor-to-spinal-cord-to-muscle loop is healthy and wired correctly.
The stretch reflex is the simplest reflex in the body because the sensory nerve connects straight to the motor nerve with no in-between cell, which is why the knee-jerk happens so fast.