Genetic linkage occurs when alleles at different loci do not segregate at random. Mendel's second law is thus broken.
Genes are linked when they are on the same chromosome. They then tend to stay together during meiosis. Alleles for genes on different chromosomes are usually not linked, due to independent assortment of chromosomes during meiosis.