Criminology has a long history of trying to understand why people reoffend. People that are released from prison offer us the opportunity study the conditions under which some individuals continue to commit crimes and others do not in great detail. Although research in the last years have incorporated the context as a source of influence on recidivism, much of the literature has focused on attributing the explanations solely on the level of the individuals themselves. Taking this individualistic perspective as my point of departure, I take some steps towards incorporating effects of the environment and aspects associated with social influence and learning in explaining why people re-offend (after being released from prisons). Studying the Chilean prison system, I first establish individual factors associated with recidivism, then account for prison environment and characteristics, to finally attempt at accounting for larger community effects. This was done by analysing data from a cohort of offenders who served sentences in Chilean prisons. Individual factors associated with time until recidivism were analysed using Event history models. Then, multilevel models were used to account for prison-specific effects: the exclusive contribution of prison to recidivism. Finally, hierarchical spatial models were used to analyse how space can be associated with varying levels of recidivism. In addition to the effects of individual characteristics, strong evidence of prison-specific effects was found, which implies that individual propensity towards recidivism is not independent of the prison where the sentence is served. In other words, differences in prison settings have the potential to impact on the individual likelihood of re-offending either by reducing or incrementing the individual risk. Likewise, evidence of spatial clustering of recidivism was also found, which indicates that recidivism has also a spatial component operating beyond the individuals' control. The main contribution of this thesis lies in demonstrating that recidivism implies a complex system of interdependence between different actors and institutions, which needs to be considered to understand recidivism in a larger context. These findings have profound theoretical and policy implications, as they imply that the responsibility for recidivism falls not only on the offenders themselves but also on the wider context of the justice system's institutions and society itself.