The left hip is in extension while the right hip is in flexion.
There are more than a dozen muscles that maneuver the hip through extension and flexion. But rather than all the hip muscles firing at once to both extend and flex the hip, the muscles that contract in flexion, during which the extensors relax, are relaxed during extension while the extensors contract. Flexion occurs when the angle between articulating bones decreases, like when you "flex" your biceps. You are decreasing the angle between your forearm and your upper arm, flexing the joint. Extension occurs when the angle between articulating bones increases, exemplified by straightening your arm, or extending it.
Muscles Involved in Hip Flexion
In reality, muscles contract or relax, they do not extend or flex. Instead, muscles flex or extend a joint, with flex meaning close and extend meaning open. So technically, the action of flexing your biceps should be called flexing your elbows, but that's much less sexy. The muscles involved in flexing the hip -- bringing your thigh and knee up -- are the iliopsoas (a combination of the psoas major and iliacus), the sartorius, the rectus femoris, the adductor longus, brevis and magnus, the gracilis, and the pectineus. That sounds like a party.
Training Flexion Muscles for Sprinting
Assuming your goal is to strengthen your hips for sprinting purposes, you will want to train flexion, extension, adduction, abduction and rotational strength. To train the flexion of the hip, the lift, you can do box jumps, A-skips, B-skips, karaoke, big hops pulling knees to chest and hurdle drills -- stepping over challenging hurdles in a sprint-like technique but in a completely controlled walking pace. You will also want to do weight-room exercises, including toes-to-bar, knees-to-elbows, L-pullups, L-sits, straight-legged weighted situps, leg lifts wearing ankle weights, and high knee marches wearing ankle weights.
Muscles Involved in Hip Extension
Hip extension is the downward motion of your legs during the sprint. The more ground force you produce, the faster you sprint. And rather than focusing on the turnover portion of your stride, focus on increasing your force production and you will be faster, assuming your technique is efficient. The muscles that extend the hip joint are the gluteus maximus, the adductor magnus (hamstring portion), the biceps femoris, the semimembranosus and the semitendinosus.
Training Extension Muscles for Sprinting
Those who can extend the hip violently and precisely will produce more ground force than those with weak extension muscles, and therefore, should be faster due to gaining more ground per stride. To train the extension muscles of the hip perform deadlifts, squats, walking lunges, jumping lunges, box jumps, broad jumps, clean pulls, snatch pulls, sled pulls and hill sprints. Always train explosively, never train slow endurance. If you're a sprinter, you have to move with maximum velocity and power, so you must train accordingly.