The hamstring muscle group consists of three separate muscles; the semitendinosus, semimembranosus and biceps femoris. During sprinting the hamstring muscles work extremely hard to decelerate the tibia or shin bone as it swings out. It is in this phase just before the foot strikes the ground that the hamstrings become injured as the muscles are working hardest at the same time as approaching their maximum length.
A pulled hamstring rarely manifests as a result of contact. If you have taken an impact to the back of the leg it should be treated as a contusion until found to be otherwise. A strained or pulled hamstring as it is sometimes called is a tear in one or more of the hamstring muscles.
Problems with the lower back and pelvis may increase the likelihood of suffering a hamstrings strain and should always be considered, particularly for recurrent hamstring injuries.