They become specialized by Gene expression. Gene expression is the process by which a specific combination of genes are turned on or off. This dictates how the cells function.
It releases certain chemicals
hahah you don't know this? can't imagine being that dumb must suck.
Living in herd is a structural adaptation.
There are three different kinds of adaptations: behavioural, physiological and structural.
Adaptations help animals survive and their ecosystem.
The second sentence does not sound correct but it seems correct to me (just not in grammar).
Hope it helped!