While the idea of computer simulation has had enormous influence on most areas of science, and even on the public imagination through its use in computer games such as SimCity, it took until the 1990s for it to have a significant impact in the social sciences. The breakthrough came when it was realised that computer programs offer the possibility of creating ‘artificial’ societies in which individuals and collective actors such as organisations could be directly represented and the effect of their interactions observed. This provided for the first time the possibility of using experimental methods with social phenomena, or at least with their computer representations; of directly studying the emergence of social institutions from individual interaction; and of using computer code as a way of formalising dynamic social theories. In this chapter, these advances in the application of computer simulation to the social sciences will be illustrated with a number of examples of recent work, showing how this new methodology is appropriate for analysing social phenomena that are inherently complex, and how it encourages experimentation and the study of emergence.