Animals form hierarchical social structures through various mechanisms such as dominance hierarchies, territories, and mating systems. Dominance hierarchies are established through aggressive behaviors and displays of dominance, where individuals within a group establish their rank through competition and conflict. Territories are also important for establishing social structure, as individuals defend their territories against intruders to secure resources and mates. Additionally, mating systems play a role in forming social hierarchies, as individuals compete for access to mates and resources, leading to the establishment of dominance within the group. These interactions help to maintain order within animal societies and ensure the efficient allocation of resources.