Complex macroscopic behaviour can arise in many-body systems with only very simple elements as a consequence of the combination of competition and inhomogeneity. This paper attempts to illustrate how statistical physics has driven this recognition, has contributed new insights and methodologies of wide application influencing many fields of science, and has been stimulated in return.