It's shared across very different species, from ants and bees all the way up to chimpanzees and humans: social hierarchy dictates the structure of a group, and the ability to correctly recognize an individual's status, as well as their own, is crucial to successful interactions in the group.
Interestingly, social cognition is distinct from social status recognition, as demonstrated by studies on humans with brain lesions . Neuroimaging also revealed that social status recognition has its own distinct network of brain regions, which includes the inferior parietal lobe (IPL), dorsolateral and ventrolateral prefrontal cortices (DLPFC and VLPFC), and portions of occipitotemporal lobe (OG). Social status is recognized through a range of nonverbal clues. For example, primates and humans are sensitive to facial expressions (such as direct eye contact) and body postures that make an individual "look" larger or more imposing.
These cues are processed through the DLPFC and VLPFC regions, which are usually associated with socioemotional responses and behavioral inhibition. They can overrule automatic responses in situations where the dominant individual imposes compliance to social norms.
As Chiao concludes in :
"Given the ubiquitous presence of social hierarchy across species and cultures, an outstanding question in social neuroscience is to understand how adaptive mechanisms in the mind and brain support the production and maintenance of social hierarchy. Recent social neuroscience studies show that distinct neural systems are involved in the recognition and experience of social hierarchy, and that activity within these brain regions are modulated by individual and cultural factors."
A recent study published in Science  found a correlation between synaptic strength (the signals between neurons) and social rank. The researchers used a mouse model to investigate potential differences in the synaptic properties in the medial PFC region (which is the homologue equivalent of the human dorsolateral and medial PFC regions) between dominant and subordinate mice. They used the test tube to rank the social hierarchy among cage groups of 4 mice each: the tube only lets one mouse through and the challenge is to push the opponent out of the tube.
Researchers found that dominant mice have larger synaptic strength than the subordinate ones. Neurons transmit signals through chemicals called neurotransmitters, which are stored in vesicles and released at the synapse (the structure that transfers chemical signals between neighboring neurons). The strength of a signal can be measured in terms of "quantal release," which basically measures the number of effective vesicles released in response to an impulse. Wang et al. detected a higher quantal release in dominant mice. Furthermore, they proved that the opposite is also true: lowering the strength of these signals caused mice to lower in social rank.
In order to prove this, they manipulated the synaptic transmission mediated by a receptor called AMPA. They delivered DNA to the mouse brain with a viral vector that preferentially infects pyramidal neurons. Using this mechanism, Wang et al. were able to either amplify or deplete the amplitudes of AMPA-mediated synaptic currents, and when they did so they noticed that mice with stronger synaptic signals moved up in the social hierarchy, whereas the ones with lower signals moved downwards in ranking.
In the Perspective review accompanying the paper , Maroteaux and Mameli conclude:
"Wang et al. provide two conceptual advances: the idea that a neurobiological substrate for social ranking is located in the mPFC, and that synaptic efficacy represents a cellular substrate determining social status. Although the mPFC has an established role in social behavior, it cannot be considered the only structure where dominance is encoded. Future studies will be necessary to determine the hierarchical organization among brain structures underlying this complex behavior."
 Chiao, J. (2010). Neural basis of social status hierarchy across species Current Opinion in Neurobiology, 20 (6), 803-809 DOI: 10.1016/j.conb.2010.08.006
 Wang, F., Zhu, J., Zhu, H., Zhang, Q., Lin, Z., & Hu, H. (2011). Bidirectional Control of Social Hierarchy by Synaptic Efficacy in Medial Prefrontal Cortex Science, 334 (6056), 693-697 DOI: 10.1126/science.1209951
 Maroteaux, M., & Mameli, M. (2011). Synaptic Switch and Social Status Science, 334 (6056), 608-609 DOI: 10.1126/science.1214713