What causes my heel hurt when I go to do certain leg stretches?

Tendonitis/fasciitis. Depending on the area of your heel that is hurting, you may be stretching an inflamed achilles tendon or an inflamed plantar fascia. Bending your ankle back and forth can irritate both these tendons.
Plantar fasciitis? Could be many things, but the two most likely are tendinitis or plantar fasciitis. The best way to know is to see a podiatrist. Another clue is when it hurts: pf hurts most with the first few steps in the morning, or after sitting for a long time. Other things to rule out are nerve entrapments.