This is a very common way to stretch your quads (thighs).
Hold onto something stable with one had while performing this stretch.
With the other hand, gently lift the foot on the same side up towards your bottom.
Hold the stretch for 30 seconds and then release the foot back onto the ground.
Repeat on the other side.
Do this stretch three times on each side for a good stretch.
The key to doing the stretch it to stand upright as you pull your foot up towards your buttock. Some people tend to lean forward which makes the stretch less effective. Keep both knees close to each other. You can pull the leg being stretched behind the other knee for a deeper stretch, which would also stretch the muscles which cross your hip (hip flexors).
If there is any pain while performing this stretch, stop and seek advice from your health professional. Make sure you read my introduction to the stretches.