The hamstrings are responsible for knee flexion - the action of bringing your heel up towards your butt. The lying leg curl adds resistance to this movement, and is therefore an effective way of directly targeting the hamstrings.
The interesting thing about the hamstrings is the dual role they play, by being responsible for the flexion of the knee, as well as the extension of the hip. We can isolate the muscle in the way discussed here, by performing a leg curl which involves the flexion of the knee joint, but we can also target the muscle with exercises which involve hip extension, with the stiff leg deadlift being one of the best options in this regard.
Therefore, an athlete will likely want to combine both hip extension and leg flexion exercises within their training plan to cover all bases when it comes to hamstring development.
Like the lying leg curl, the standing version isolates and targets the hamstrings. There is little difference between the standing and lying variations, so pick whichever one you feel most comfortable performing.
The important point to follow during the standing leg curl is to avoid any movement of the torso or hips. The upper leg should remain stationary, with flexion of the knee being the only action moving the lever.
You may notice that the hamstrings can be targeted with the leg curl, as well as other exercises, such as the barbell deadlift, which do not involve the flexion of the knee. The reason behind this is due to the hamstrings dual role, being both responsible for the flexion of the knee (like during the standing leg curl) as well as the extension of the hip (like during the deadlift). An athlete may wish to incorporate both types of exercises within their training plan to train both these aspects.