Stand erect. You may want to brace your hand against a wall or post.
Bend your knee behind you so that you can grasp your foot, holding your heel against your buttocks. If you are flexible, you can do this with the hand on the same side as the upraised foot. If you are less flexible you may find it easier to use the opposite hand, or even to use an exercise band or towel to extend your reach.
Stand up straight and push your knee gently back as far as you can. Don't add pressure with the hand, you are just using that to keep the heel in place during the stretch.
Hold for 15 to 30 seconds, then gently release your foot, stand on both feet, and repeat with the opposite foot.