It is a behavioral adaptation.
There are three types of adaptations:
Structural - body parts that help it survive (e.g. color, size, shape)
Physiological - systems present in an organism that allow it a special feature (e.g. venom, skin color changes)
Behavioral - an action that allows the organism to better survive