The study of how animal behavior is shaped by natural selection and its role in survival and reproduction.