In biology, two or more structures are said to be homologous if they are alike because of shared ancestry. This could be evolutionary ancestry, meaning that the structures evolved from some structure in a common ancestor (the wings of bats and the arms of humans are homologous in this sense) or developmental ancestry, meaning that the structures arose from the same tissue in embryonal development (the ovaries of females and the testicles of males are homologous in this sense). Homology has to be distinguished from analogy; for instance, the wings of insects and the wings of birds are analogous but not homologous. These similar structures most likely evolved through different pathways, a process known as convergent evolution.
Understanding developmental homology
Males and females share almost the same genome, and it is much easier and more efficient to make slight modifications to a single body plan than to come up with two different plans altogether. Rather than have one section of the genome make an ovary and another section make a testicle, one section forms the common precursor of both and then things change slightly towards the end, under the action of hormones. If something is easier and more efficient, evolution is more likely to find it. However it doesn't always find it: even though the vas deferens in males and the fallopian tube in females perform a very similar function, they are not homologous but analogous: they are constructed separately from scratch. Other homologous structures include the clitoris and the penis, as well as the nipples in both sexes.
Homology of sequences in genetics
In genetics, homology is used in reference to protein or DNA sequences, meaning that the given sequences share ancestry. Homology among proteins and DNA is often concluded on the basis of sequence similarity, especially in bioinformatics. For example, in general, if two genes have an almost identical DNA sequence, it is likely that they are homologous. However, it may be that the sequence similarity did not arise from their sharing a common ancestor; short sequences may be similar by chance, or sequences may be similar because both were selected to bind to a particular protein, such as a transcription factor. Such sequences are similar but not homologous. Many algorithms exist to cluster protein sequences into sequence families, which are sets of mutually homologous sequences. (See sequence clustering and sequence alignment.) Homology of sequences can be of two types: orthology or paralogy. Sequences are orthologous if they are homologous and were separated by a speciation event; if a gene exists in a species, and that species diverges into two species, then the copies of this gene in the resulting species are orthologous. Sequences are paralogous if they are homologous and were separated by a gene duplication event; if a gene in an organism is duplicated, each copy of the gene is paralogous to the other. A pair of sequences that are orthologous to each other are called orthologs, a pair that are paralogous are called paralogs. A homologous pair of chromosomes in a diploid cell is a matching pair of chromosomes, one derived from each parent of the organism. Except for the sex chromosomes, the chromosomes of each homologous pair share significant sequence similarity across their entire length, and thus typically contain the same sequence of genes. The sex chromosomes have a shorter region of sequence similarity. Based on the sequence similarity and our knowledge of biology, we can presume that the chromosomes are paralogous.