When stimulated by a motor neuron, a muscle contracts when the actin and myosin filaments slide past each other within a sarcomere, shortening the muscle fiber.