A gene, or a characteristic that is part of your DNA, determines your traits. Genes have all of the information that makes you who you are, including hair color, skin color, eye color, height, and which hand you use to write. Since some characteristics are advantageous in certain environments, what color and texture your hair is, the color of your skin and more all depend on the environment where your ancestors were.
For example, people who come from southern Africa typically have darker skin and darker hair than Europeans or northern Africans. There is a good reason for this. When sunlight hits human skin, our bodies use that energy to make vitamin D. Vitamin D is necessary for us to have strong muscles and fight disease, but we can also get too much vitamin D. An excess of vitamin D can cause your kidneys to fail and eventually result in death where there is a lot of sunlight! So, in areas where there is not a lot of sunlight, it pays to have light skin and absorb more sunlight and therefore make more vitamin D. In areas with a lot of sunlight, it pays off to have dark skin in order to not absorb as much sunlight and avoid an excess of vitamin D. Of course, there are many other reasons that we have a certain skin tone. More importantly, our skin tone is not just controlled by several different genes, it’s also affected by our environment!
Gene frequency refers to the amount of times in a population that a certain gene happens. From our example above, we would expect that the genes which cause a darker skin tone in humans have a higher frequency in Africa than in Europe. It is much easier to talk about evolution when you can talk about the differences in gene frequencies between different populations. When talking about human populations, the differences between an African and a European are actually very small – even though they are very noticeable! If you choose two random Americans that have similar skin color, facial features, height and weight they will still have many genetic differences. In fact, they will have as many genetic differences as between a light-skinned European and a dark-skinned African! As humans, we are all very complex and have millions of small differences, some more noticeable than others.