The phenotype is what is actually expressed by the DNA that can be acted on.
The genotype determines the phenotype. However the genotype is the actual DNA that is enclosed and protected in the nucleus. Environmental factors that determine natural selection can not affect the DNA.
The phenotype is what is physically expressed in the organism. Only what is physically expressed can be acted on by environmental factors causing natural selection.
There may be recessive genes in the genotype that are covered by dominate genes. Only the dominate gene will be expressed in the phenotype. If there are two recessives the gene traits may be expressed in the phenotype. If the physical trait coded by the gene trait is not beneficial in the environment natural selection will eliminate that trait when it is expressed.
It is important to remember that natural selection can only eliminate traits that are not well adapted to the environment. Natural selection can not create new traits. It can only act on the phenotype, that is expressed traits.