The expression of behaviours is influenced by many segregating genes. Behaviours are, therefore, complex traits. They have, however, unique characteristics that set them apart from physiological and morphological quantitative traits. First, behaviours are the ultimate expression of the nervous system. This means that understanding the genetic underpinnings of behaviours requires a neurobiological context, i.e. an understanding of the genes–brain–behaviour axis. In other words, how do ensembles of genes empower specific neural circuits to drive behaviours? Second, behaviours represent the interface between an organism and its environment. Thus, environmental effects are likely to make substantial contributions to determining behavioural outputs and genotype-by-environment interactions are expected to be prominent. It is important to differentiate between genes that contribute to the manifestation of the behavioural phenotype and genes that contribute to phenotypic variation in behaviour. The former are identified by classical mutagenesis experiments, whereas the latter can be detected through quantitative genetic approaches. Genes that contribute to phenotypic variation in behaviour harbour polymorphisms that provide the substrates for evolution. This review focuses on olfactory behaviour in Drosophila with the goal to illustrate how fundamental insights derived from studies on chemosensation can be applied to a wide range of behavioural phenotypes.