Because there is some crossing over of DNA when the chromosomes segregate, alleles on the same chromosome can be separated and go to different cells. There is much more chance of this happening if the alleles are far apart on the chromosome, as it is more likely that a cross-over will occur between them.
The physical distance between two genes can be calculated using the offspring of an organism showing two linked genetic traits, and finding the percentage of children where the two traits don't run together. The higher the percentage of offspring that don't show both traits, the further apart on the chromosome they are. A study of the linkages between many genes enables the creation of a linkage map.