Deciphering how neuronal brain circuits control behaviour represents a key task in modern neuroscience. A fundamental problem is to understand how brains integrate present sensory stimuli, past experience, and behavioural options. We aim at understanding how adaptive behaviour is organized through the properties of single neurons, their synapses, and the circuits the neurons are part of. A combination of genetic tools employing cell-specific transgene expression, e.g., opto- and thermogenetics, splitGFP reconstitution across cells, or functional optical imaging, advances the analysis of brains as integrated systems for the control of behaviour. For such an endeavour, the fruit fly Drosophila melanogaster is particularly suitable. It combines brain simplicity, behavioural richness, and experimental accessibility. We use associative olfactory conditioning paradigms to analyze how odour information is represented in the brain and how odour representations are associated with behavioural relevance through learning. As a model system of how a central brain structure brings about such adaptive behaviour, our research focuses on the mushroom body of the Drosophila central brain. The mushroom body of Drosophila is an evolutionary ancient third-order brain structure, comprising but ~2200 intrinsic neurons. It integrates input from multiple sensory modalities with experience-dependent modulation through multiple biogenic amines and neuropeptides. Its output then is integrated with innate behavioural tendencies to bring about adaptive behaviour. The mushroom body features structural, functional, or cellular similarity with several distinct mammalian brain structures. Our recent research on the function of the mushroom body will be summarized and discussed as a paradigmatic case of how a brain operates.