Hamstring muscles are active in all thigh extension – except when the knees are fully flexed such as in danurasana/bow pose. They also support trunk extension, and if they were to become paralyzed, our bodies would tip forward when standing. The hamstrings are also very active when walking on flat ground (city walking!) and are primarily used during the eccentric portion of a walking stride, right before our heel touches down. So what is the main job of each muscle?
Semitendinosus– is a long muscle and is named after the cord like tendon, which begins about 2/3 of the way down the posterior thigh. The tendon starts at the IT and attaches to the tibia portion of the inner knee area.
Semimembranousus– is named after its broad flattened attachment to the IT and its tendon forms near the mid thigh. The tendon has three attachments on the inner knee area, including the medial condyle of the tibia and the medial joint capsule.
Both these muscles work together, and when the knee is flexed 90 degrees because they attaché to the inner knee area they can medially rotate the tibia about 10 degrees. These muscles are considered to be “medial” hamstrings and are generally considered to be less “active” then the biceps femoris.
Biceps Femoris- has two heads (attachments) the long and short head. The long head start at the IT and protects the sciatic nerve as it descends through the gluteal region down the leg. The short head begins at the linea aspera (lateral thigh area) and both heads attach to the lateral knee at the boney head of the fibula.
When the knee is flexed 90 degrees the tendons of the biceps femoris and the IT band are palpable (and visible) and can laterally rotate the tibia, up to about 40 degrees.
Because the hamstrings are two joint muscles (hip and knee) when they concentrically contract they extend the hip and flex the knee. When walking they are used eccentrically, and with knee flexion, the hamstrings rotate the flexed knee. The majority of hamstring injuries occur when the tendons tear at the proximal attachment of the IT joint and can be a result of not enough warm up combined with a strenuous action.
 
Moore and Dalley (2006) Clinically Oriented Anatomy, 5th edition, Lippincott Williams & Wilkins, Baltimore, MD.