Hamstring pain is usually either an injury to the hamstring muscles, or is being referred from somewhere else. Here are some less common causes of pain in the back of the thigh.
Upper hamstring tendinopathy
Hamstring tendonitis (or tendinopathy) can occur at the origin of the hamstring muscles at the ischial tuberosity (or bony bits in the backside that you sit on). Symptoms include tenderness and thickening of the tendon at the site of pain and may be very similar to ischial bursitis. Hamstring tendinitis in the buttocks might be caused by repetitive sprinting or overuse. Treatment includes rest, ice or cold therapy and cross friction massage.
Posterior thigh compartment syndrome
A compartment syndrome occurs when the muscle swells up too big for the sheath that surrounds it causing pressure and pain. Symptoms include a dull pain in the back of the thigh, cramp and weakness. It is caused either by overuse as might be seen in endurance runners or repeated trauma from redcurrant hamstring strains. Surgery is thought to be the most effective form of treatment.
Hamstring tendon avulsion
An avulsion strain is one where the tendon tears pulling a small part of the bone away with it. This is more common in younger athletes (14-18 year olds) and older people who may have had a history of chonic hamstring tendinitis.
A young athlete with severe hamsting pain at the point of origin should always be suspected of having an avulsion strain until an X-ray or bone scan can prove otherwise. Treatment of a severe case will require surgery. It may also be advisable for less severe cases to be operated on as conservative treatment methods (rest, ice etc) may leave the young athlete with a weakness of the hamstrings in the future.