The backs of the thighs contain the hamstrings, which include the biceps femoris, semitendinosus and semimembranosus. These muscles flex the knees, causing your lower legs to move back toward your butt. While running, this takes place when your foot leaves the ground and your leg starts moving forward for the next foot strike.