The hamstrings are 3 muscles that run down the back of your leg. They help bend the knee and pull back the hip. If you've ever seen a baseball player sprinting to first base pull up and grab the back of their thigh, you've seen a common hamstring injury, one that can be rather painful. The term "hamstrung" comes from medieval times when a sword fighting knight would try to slice the back of his opponents thigh to immobilize him, or a slaveholder would slash a slave's hamstrings so he couldn't run away.
Many of us have underdeveloped hamstrings as they are not utilized much in regular walking. We also tend to have tight hamstrings because we sit so much. This combination makes them ripe for a tear or strain when we suddenly accelerate - especially if we haven't warmed up - as the hamstrings get overpowered by stronger quad muscles working as antagonists.
To prevent such injury you should strengthen and stretch your hamstrings regularly, especially if you are a runner or athlete. Although there are many exercise machines at the gym that work the hamstrings, we suggest more functional exercises like bridging on a ball or standing leg curls. Walking backwards on a treadmill or the elliptical machine can also help develop the hamstrings.
When stretching, be careful not to bend your lower back. Instead, use the technique demonstrated by Hussain in this video