Summary Many aspects of the social environment affect hypothalamic‐pituitary‐adrenal (HPA) axis function and increase circulating glucocorticoid concentrations. In this review, we examine the relationships between the social environment and the function of the HPA axis in vertebrates. First, we explore the effects of the social environment on glucocorticoid secretion in territorial (primarily non‐social) species, with an emphasis on the effects of variation in population density, as modified by environmental factors such as predation risk and food availability. In general, high population density or frequent territorial intrusions are associated with increased glucocorticoid secretion in a wide range of taxa, including mammals, birds, fish and reptiles, although there is considerable variability across species. Second, we consider the effects of social interactions and dominance rank on glucocorticoid secretion in social species, mostly in birds and mammals. We review studies that have detected an association between social status and glucocorticoid levels – sometimes with higher glucocorticoid levels in low‐ranking individuals, and sometimes with higher glucocorticoid levels in dominant individuals. The relationship between dominance and glucocorticoid levels varies among species, populations and years, in a manner that depends on the stability of the social hierarchy, environmental conditions, the type of breeding system, and the manner in which high rank is obtained and maintained. Finally, we discuss the concept of allostasis and consider interactions between social effects and other environmental factors, noting that there is relatively little research on these interactions to date. For both non‐social and social species, we identify priorities of future research. These priorities include more complete descriptions of HPA function that move beyond measurements of basal glucocorticoid concentrations (which will generally require field experiments), to studies that examine organizational effects of social stressors, that directly test the relationship between HPA function and fitness, and that examine how glucocorticoid responses affect population dynamics. Although several lines of evidence suggest that glucocorticoid responses can affect the fitness of individuals and therefore can alter the dynamics of populations, the effect of glucocorticoid responses on population dynamics remains essentially unstudied.