The hamstrings are tendons (strong bands of tissue) at the back of the thighs that attach the large thigh muscle to the bone.
The term ‘hamstring’ also refers to the group of three muscles that run along the back of your thigh, from your hip to just below your knee.
The hamstring muscles aren’t used much while standing or walking, but they’re very active during activities that involve bending the knee, such as running, jumping and climbing.
A hamstring injury can occur if any of the tendons or muscles are stretched beyond their limit.
They often occur during sudden, explosive movements, such as sprinting, lunging or jumping. But they can also occur more gradually, or during slower movements that overstretch your hamstring.
Recurring injury is common in athletes and sportsmen, as you’re more likely to injure your hamstring if you’ve injured it before.
Mild hamstring strains (grade 1) will usually cause sudden pain and tenderness the back of your thigh. It may be painful to move your leg, but the strength of the muscle shouldn’t be affected.
Partial hamstring tears (grade 2) are usually more painful and tender. There may also be some swelling and bruising at the back of your thigh and you may have lost some strength in your leg.
Severe hamstring tears (grade 3) will usually be very painful, tender, swollen and bruised. There may have been a “popping” sensation at the time of the injury and you’ll be unable to use the affected leg.
Source NHS Choices