The relationship between genes can be measured by comparing the sequences of their DNA. If the level of similarity exceeds a minimum value, one can conclude that the genes descend from a common ancestor; they are homologous. Genes that are related by direct descent from a common ancestor are orthologous genes - they are usually found at the same locus in different species. Genes that are related as a result of a gene duplication event are parologous genes. 
It is often assumed that the functions of orthologous genes are more similar than those of paralogous genes, although the difference is minimal.