If camouflage is hereditary, it is passed on to the current population's offspring. As a result, after many generations, most individuals have good protective colouring.
The predator's hunt involves a selection of individuals. Some are eliminated, others survive. The scientific term for this process is "natural selection".
The scientific term for this process that occurs through heredity and natural selection and that leads to good adaptations is "evolution".