Lie on your back, with the knee of the leg you want to stretch bent.
Grasp behind the bent knee and straighten the knee until you feel a stretch in your hamstrings (back of your thigh).
Note: You can perform the stretch as a static stretch (i.e. keeping the knee extension at the same angle for a period of time) or dynamically (i.e. straightening and bending the knee as a pumping movement).