In the past, some chameleons had the ability to camouflage with their surroundings, while others didn't. This is a variation in a trait among individuals of the same species.
Variation: Cannot Camouflage
Variation: Can Camouflage
Birds spied the chameleons from overhead and swooped down to catch their prey. The chameleons who could camouflage were less likely to be seen and eaten by birds, unlike chameleons who couldn't blend into their surroundings. The chameleons who could camouflage were better adapted to their environment as compared to chameleons who couldn't camouflage.
The more adapted an organism is to its environment, the more fit it is. Since chameleons who couldn't camouflage were more adapted, they were more fit. On the other hand, chameleons who couldn't camouflage were not as adapted, so they were not very fit.
Less Fit: (Cannot Camouflage)
More Fit (Can Camouflage)
The chameleons who couldn't camouflage were eventually spotted and eaten by the birds, while the chameleons who could camouflage stayed alive. These chameleons produced offspring and passed along the camouflage gene to them. As a result, there were many chameleons who could camouflage, and only a few who couldn't.
This cycle continued, and the chameleons who could camouflage kept having offspring who could also camouflage. The chameleons who couldn't camouflage died out. Over time, the entire population changed until the chameleons became best adapted to their environment, which meant that they could all camouflage. This is called evolution, or change over time.