The study of how organisms interact with their environment and each other, and the patterns of behavior that evolve.