Start by putting both your legs onto a wall while you are seated underneath them. The closer your hips are to the wall the more of a stretch that your hamstrings will feel. Your feet should be together. From here, perform a quad set by contracting your quad muscles which will straighten your knees. At the same time, lift your shoulder blades off the ground and reach forward toward your feet. Hold that position for as long as prescribed.
You should feel a stretch in your hamstring muscles. You should also feel your quadriceps and core muscles working.
Don't allow motion other than your quadriceps and core muscles.