The principle of specificity means that adaptations to training are specific to the training. Specificity applies to the muscle group trained, the speed of training, the intensity of training, the movements of training and the energy systems utilised. Specificity is that physiological adaptations only occur in response to the stress placed on the body and only to the sections that experience this stress.
Specificity means if you participate in an aerobic sport such as marathon running, you need to do aerobic training that involves running so that your adaptations improve your performance in that sport. Training should be done at a pace and in an environment that best replicates competition in order to get the best specific gains or adaptations for competition. Continuous training, such as running outside, becomes the best method because it specifically reflects the marathon sport.
Specificity when applied to resistance training requires that the muscle groups used in the sport are the ones trained. Training should also seek to replicate similar movements from the sport at a similar speed. Strength training for swimming would then use a lat pull-down to replicate the pulling movement of swimming, at the most efficient swimming movement speed to increase strength at that speed for that movement in swimming.