Organisms with a heritable trait that is advantageous to survive and reproduce are more likely to survive and reproduce, which can continue over generations, making the trait more common. This way, the population evolves in a way that they become more adapted to its environment.