The quadriceps extend the knee and stabilize the lower body, while the hamstrings flex the knee and extend the hip during running.