Someone recently commented on a friends post that the hamstrings are knee flexors and so in a pose like reverse plank ("purvottanasana" or "straight bridge") they don't activate, since the knees are kept straight.
The hamstrings are actually a multijoint set of muscles that run along the back of the thigh. They act on the back of the hip joint and the back of the knee. They can be used with the gluteus maximus to open the front of the hip joint. And actually, in poses where the knees are straight, they can be used in conjunction with the quadriceps to stabilize the knee.
Originally named for the prominent tendons at the back of the knee, some define the hamstrings as only those muscles that work on both the back of the hip and the back of the knee.
I think of them as including the Adductor Magnus long head (which acts only on the hip), biceps femoris short head (which acts only on the knee), biceps femoris long head, semitendinosus and semimembranosus.
All of these muscles are positioned along the back of the thigh and affect the knees or hips or both.
In general, bending the knee and/or bending the hip backwards allows the hamstrings to shorten (or is caused by them shortening) while straightening the knee and/or bending the hip forwards causes the hamstrings to lengthen.
Other muscles that relate to the hamstrings in the way that they cross the back of the knee and insert into the inner surface near the top of the tibia (along with the semitendinosus) include the gracilis and sartorius.
My feeling is that with the knee straight these muscles can be used to help stabilize the knee in rotation. With the knee bent they can be used to rotate the shin inwards relative to the thigh.
Also important for their job of opposing the hamstrings at the knee joint are the quadriceps.
And for working with or instead of the hamstrings at the back of the hip joint is the gluteus maximus.
A set of muscles important in opposing the hamstrings (and glute maximus) at the hip joint are the hip flexors. This group can include the psoas, rectus femoris, iliacus, tensor fasciae latae, gluteus minimus as well as the previously mentioned sartorius.
Other muscles also important with regards to bending the knee backwards are the popliteus and the gastrocnemius or calf muscle.
Read more on hamstring anatomy.
I think that a lot of "tight" people come to yoga with the idea of stretching tight hamstrings and of helping to make them more flexible. I'd suggest that for effective hamstring stretching (with the goal of improving hamstring flexibility) one of the first tasks is to learn to relax and contract the hamstrings and also to be able to feel the difference. In addition it can be very helpful to also learn to feel and control the gluteus maximus (glutes.)
To that end it can help to understand the different jobs that the glutes and hamstrings perform.
The glutes and hamstrings can be used to control the descent into a forward bend and also to help pull the hips out of a forward bend (bottom left). This can be easier to learn to feel and control when moving into and out of standing hamstring stretches.
They can be used to bend the hips backwards or to bend the knees backwards. This can be felt in any pose where the leg is extended such as doing a leg extension while standing (above right) or extended leg cat pose (below left).
They can also be used to resist "straightening" the knee and to help stabilize the knee. As an example of this I sometimes play with stabilizing the knee in reverse plank (above right) prior to lifting.
Read more on hamstring strengthening exercises.
Because they are a group of muscles the hamstrings can be used against the quadriceps to stabilize the knee joint while at the same helping to control the hip joint. In fact, stabilizing the knee joint may help to give the hamstring muscles not involved in this stabilizing action a foundation from which to work on the hip joint.
With regards to both the hip and knee joint my understanding of both the muscles that cross the knee and hip not only move joint or stabilize it, they also are responsible for adding tension to the envelope of the hip or knee.
The idea in this case is based on a presentation by Jaap Van der Wal that suggests that tendons, ligaments and muscle tissue are combined in a single architectural unit called a dynament. The practical implications of this is that muscle tension creates "ligament" tension. My understanding is that the body works in such a way that when joints are moved or stabilized the ligaments are also stabilized in such a way as to pressurize the liquid inside the joint in such a way so that bones do not directly come into contact. This tension maintains the relationship of the bones at the joint without them contacting each other. And it does so by squeezing the joint capsule in such a way that balanced tension is created throughout the capsule while at the same time pushing the bones away from each other, like squeezing the middle of a balloon so that the balloon bulges in a direction at 90 degrees to the squeeze.
And so when it comes to knee injuries, or recovering knee function after a knee injury, one of the ways that I use this understanding is to feel for tension that indicates that one muscle is compensation for another. As an example I could feel in a thigh's level squat that the outer tendon of my right gastroc was active to the point of discomfort. I figured that perhaps it was compensating for the biceps femoris which crosses that tendon. I focused on contracting the short head and the gastroc released.
This same idea can be applied to the hip joint. If there is pain in the hip joint in certain positions, it may be one muscle compensation for another to keep the necessary tension on the joint capsule to prevent rupture. The trick is to figure out which muscle isn't activating so that you can activate it (and deactivate the muscle that was compensating for it.)