A gene is a segment of DNA coding for a particular protein. Alleles are different forms of a given gene.
Every gene can have two or more than two alleles, but, alleles exist only in pairs to produce a phenotypic effect( an observable trait).
For example, the gene coding for height has two alleles -
(i) T - which is the dominant allele and leads to a tall phenotype in homozygous (TT) or heterozygous (Tt)condition ,and
(ii) t - which is the recessive allele, and leads to a dwarf phenotype only in homozygous(tt) condition.
Alleles for a given gene are located at homologous sites of homologous chromosomes, and alleles segregate during gamete formation.