The main factors affecting gene balance are: mutation, a migration, a selection and the gene drift.
Mutation, the process by which one allele transforms into another, can alter the gene frequency of a population. If the mutation rate of a gene THE for its allele a is greater than the inverse mutation rate (The à THE), there will be an increase in the frequency of the allele a and a decrease in the frequency of THE.
Different populations of the same species are not always isolated. Individuals can migrate by joining or leaving a population (emigration)
Migrations can alter the genetic makeup of a population. For example, if a population consisting only of blue-eyed people migrates to a region where most people have brown eyes, there will be an increase in the frequency of the blue-eye allele and a corresponding decrease in the frequency of the brown-eye allele.
Depending on their genetic make-up, an individual may be more or less likely to survive and reproduce.
An example of this is industrial melanism. Dark-colored genotype moths are more intensely hunted by birds than light moths in unpolluted areas. Therefore the frequency of the dark color conditioning gene remains low. In the polluted areas the opposite happens: the most intensely hunted by the birds are the light colored ones. This increases the frequency of dark moths and the frequency of the allele conditioning this feature.
Ecological disasters such as forest fires, floods, deforestation, etc. can reduce the size of a population so drastically that the few survivors are not genetically representative samples of the original population. By chance, and not by adaptation criteria, certain alleles may suddenly increase in frequency, while other alleles may simply disappear. This phenomenon is called gene drift.