I'm also a bit concerned that it was "last week" and now only hurts when you actually walk. Sounds more like an injury than just the "oooh, I worked hard" feeling of DOMS that comes after working out.
Rest up, if pain persists in 1-2 days, see a doctor.
Generally speaking, thigh stretching is done either by standing against a wall and lifting a foot up to your bum then holding the foot up with your hand while trying to pull it down again, or else put one foot on a seat behind you and slowly bend the other leg until you feel the stretch.
I would not recommend stretching this if it's brought on by exercise though - rest first, see a doctor if it doesn't go away. If it aches kind of all the time just a little, that could be DOMS, and you can then go ahead and stretch it.
Deb, in New Zealand