Things don’t learn to evolve – they do it by random chance! A species has a certain amount of variation within it, and every now and then, one individual will come out slightly different – just by chance. If that difference is useful to them, then they might survive longer than the others that didn’t have that difference. They will reproduce and pass that new feature on to its offspring. If the difference is not useful, or is detrimental, then they will die out and not reproduce, thus not allowing any more of that feature to arrive.
For example, think of a species of pale brown moth that lives in a dark brown wood. There are 1000 moths in our population, and 998 are the same shade of pale brown. But because there is some diversity / variation in the species, the 999th moth is dark brown and the 1000th moth is white. The white moth won’t last long because it will be very easily visible in the dark brown wood, and will get eaten by a robin. Quite a lot of the 998 pale brown moths will get eaten too, but quite a lot will survive. The dark brown moth, however, has a distinct advantage because it is very well camouflaged, so it will live. In the next generation, the dark brown moth, and say 99 pale brown moths will all reproduce and each lay 10 eggs, which hatch to become new moths. There will be only 990 pale brown moths but there will now be 10 dark brown moths. In this way, the population of moths will gradually become predominantly dark as they have the advantage of camouflage. The moth didn’t know or learn how to evolve, it was just purely by chance that it was different from the others in a way that helped it to live longer and have more offspring.
Comments