Specifically, a gene is a sequence of nucleotides coding for a protein (or, in some cases, part of a protein). A gene may exist in alternative forms, called alleles. Most genes have existed unaltered for millions of years; genes do not change except in the rare event of mutation.
More generally, a gene is the unit of heredity. Williams defined the gene as
"that which segregates and recombines with appreciable frequency."
On this definition, the gene can be any length of chromosome that has sufficient permanance for natural selection to adjust its frequency; it is what Dawkins calls the replicator. This is important because it tells us what it is that adaptations benefit (see levels of organization).
Biologists disagree about what exactly a gene is. The geneticist Linda Partridge gives her own definition .
Figure: the transfer of information in a cell; a sequence of DNA identified as a gene encodes for a protein via the RNA.