Animals form social hierarchies through various means such as dominant behavior, physical displays, and establishing territories. This helps in maintaining order within the group and determining access to resources such as food, mates, and shelter. Dominant individuals often assert their authority through aggressive displays or gestures, while others may submit or show submissiveness to higher-ranking individuals. These hierarchies can be fluid and may change based on various factors such as age, size, strength, and social skills.