I realize you put "know" in double quotes to show that it shouldn't be taken literally, so you already know that there is "knowing" involved.
It is simpler to explain losing a feature. There are fish that now live permanently in caves where there is no light. These fish have lost their vision because vision isn't useful to them. In these fish, their eyes start to develop but then fail to continue development. It is a basic fact of life that genetic mutations are continually occurring. Well, back when the fish lived in surface water with light reaching them, their eyes were useful, and fell under the protection of natural selection, which continually eliminated deleterious mutations as they occurred, maintaining functioning eyes in the fish. However, once the fish moved permanently into caves where there was no light, eyes were no longer of any use to the fish - eyes neither helped the fish survive or reproduce. Therefore, the genes encoding their eyes were released from protection by natural selection: mutations were free to accumulate, and the developmental program that produces eye was destroyed.
Gaining a new feature is, obviously, the more-complex task. Here natural selection also plays the biggest role, but in the opposite direction. It is a basic fact of life that genetic mutations are continually occurring. When a mutation that affects an existing structure proves useful to the survival and reproduction of its possessors, natural selection tends to retain and spread that mutation. In this way, structures can change over time, becoming better at their current task or even adapting to new tasks that arise under different environmental conditions. We now know that most new structures actually arise by modifications made to preexisting structures. Take our arms and hands, for instance. It is not like there were no animals with limbs and then suddenly, POOF!, one huge mutation created our arms and hands from scratch. No, our front limbs can be traced back to those of earlier primates, which can be traced back to ..., which can be traced back to those of "reptiles", which can be traced back to those of amphibians, which can be traced back to the paired pectoral fins of certain fish. The preexisting structure was the paired pectoral fins of fish: over tens of millions of years they evolved in the limbs that could support amphibians out of water, then over the course of another 300 million years THOSE preexisting structures continued to change until you end with the modern humans' arms and hands.
But, you may ask, where did the paired fins of fish come from? First, even if we could not go back any further wouldn't affect the fact that our limbs evolved from the fish's paired fins. Second, we do have some ideas: it is thought that paired fins of fish arose from a single median fin. And it appears that the unpaired, medial fin itself may have arisen from branchial rays (gill rays): even if that is not the case, it is clear that there are shared developmental genetics between paired limbs and branchial rays.