My hamstring becomes tense when I bend the knee. It is like I am fighting against the muscle.

What could be causing this?