Socioeconomic mixing at school is often considered to be a desirable objective, as it would reduce academic inequalities and help pacify inter-group relations. For this reason, socioeconomic segregation, understood as the spatial distribution of students across different schools, has been extensively studied in educational sociology. However, the interactions among students in cases where schools are effectively diverse have been notably underexplored. Does spatial diversity imply relational mixing, or do students keep interacting with socioeconomically similar peers even in formally desegregated contexts? This raises the question of homophily, the principle by which relationships occur at a higher rate among similar individuals. In this dissertation, I study socioeconomic homophily among a cohort of 860 middle school students in four schools in France, followed during three years. Based on the statistical analysis of students’ friendship networks and on qualitative interviews, I examine the magnitude of this homophily, and try to disentangle the relational processes through which it emerges. In particular, I consider the respective roles of dispositional and contextual factors: to which extent are friendship pairings driven by internalized traits – preferences, tastes, ways of feeling and behaving –, and, on the contrary, by the constraints and incentives that the immediate environment exerts? Results suggest that there generally is socioeconomic homophily among adolescents, but that its magnitude drastically varies across schools. These differences are explained by a multiplicity of factors, as socioeconomic homophily emerges through the joint effect of several relational processes. Among these, the psychological tendency to search for socioeconomically similar friends only accounts for a minority of the total homophily; spatial constraints – such as classrooms and places of residence – and, most importantly, network and group mechanisms – notably transitivity –, play a key role as well. Finally, results hint at a strong variation in the local salience of socioeconomic attributes: depending on the context, youth’s socioeconomic origin can be made particularly visible, or on the contrary be “flattened” and minimized, which may in turn explain students’ propensity to base their friendship behaviors on this particular criteria.