When part of the genome
containing one or more genes (in whole or significant part) is duplicated. Just as the title suggests.
Duplication can occur through replication errors (in-built) or transposition (simple insertion via cut 'n' paste, or cointegration) reactions (viral causation). Note that the transfer of both copies of a gene to a single member of a homologous pair of chromosomes (to use the example of a diploid organism) results in gene duplication for any inheritor of the enhanced member - and likely deleterious effects for any inheritor of the depleted member. Most duplications result from replication errors and hence give rise to two adjacent copies of the same gene(s), through these can be later shuffled around the surprisingly plastic genome.
Considering the simple example of two adjacent copies of the same gene, it is easy to see that one is free to mutate whilst the other maintains original function. In this way one of the copies can evolve new functionality - an important aspect of evolutionary theory and the process by which homologous genes are formed. During the course of such evolution, this gene may at certain stages cease to be functional and hence become a pseudogene; it may even start in this state, if the duplication missed the promoter or part of the structural element (the part of the gene coding for the protein itself).
The globin genes are prime examples of gene duplication: in humans, the alpha (haemo)globin-like genes are clustered on chromosome 16, and the beta (haemo)globin-like genes on chromosome 11 (more specifically, clustered in a 50kb region in both cases), with the myoglobin gene on chromosome 22. By using models of sequence divergence as a function of time since duplication, one can trace back to a single ancestral globin gene, locating each divergence on a time scale obtained from the fossil record.
Footnote: The formation of processed pseudogenes could be considered a form of gene duplication.