The hamstrings are located in the back of the thigh. These muscles act at the hip joint to move your leg behind you and also at the knee joint to bring your lower leg closer to the back of your thigh. These muscles are especially important for activities like walking or slowing down the leg after kicking a football.