Behavioral adaptation is the process by which an organism or a species changes its pattern of action to better suit its environment. It is contrasted with structural adaptation, which is the appearance of physical features that confer an advantage upon a species.
Any behavior that helps ensure the survival of an organism specifically, and its species generally, can be considered a behavioral adaptation, so examples of behavioral adaptation are numerous. Two common, opposite behavioral adaptations are diurnality and nocturnality, which refer to being active during the day and during the night, respectively. A species might survive better when it is active at night because, for example, it can better hide from predators. However, behavioral adaptations need not result so directly in higher survival and reproduction rates. For example, female fruit flies are more likely to mate with males that express unusual traits. While this behavior does not help the success of individual organisms, it does help ensure genetic diversity and thus the success of the species as a whole.
Unlike other adaptations, however, behavioral adaptations are not always heritable. In many cases, they are learned. A commonly observed example of this is the differences between populations of animals that live in the wild and ones that live among humans. Wild birds tend to be skittish around people, but birds that live in urban areas often become less fearful as they come to see people as sources of food. This, too, is a behavioral adaptation, but it is learned, not inherited.