A muscle contracts when the electrical impulse of a nerve reaches it. Each muscle has thousands of specialized fibers. The fibers start sliding along each other when stimulated, causing a muscle contraction.