The immune system is a complex distributed system consisting of cells, which circulate through the body, communicate and turnover in response to antigenic perturbations. We discuss new approaches to modelling the functioning of the immune system of humans and experimental animals with a focus on its ‘complexity’. Emerging mathematical and computer models are reviewed to describe the immune system diversity, the cell/cytokine network communication structures, hierarchical regulation, and evolutionary dynamics of immune repertoires.