How and why animals exhibit certain behaviours is one of the most interesting, but also among the most complex biological questions to answer. Traditionally, this question was approached from either ethology -- focusing on strategy (the why) from an evolutionary perspective, or neuroscience -- focusing on mechanism (the how) from a physiological perspective, but the gap between these approaches is now narrowing with technological advances allowing the collection of vast data sets to capture motile behaviour and brain dynamics, including its diversity and variability. In this thesis, we have taken a physical approach towards understanding motile behaviour, striving to uncover simple ideas from large, holistic data sets in a principled way, by applying dimensionality reduction and minimalistic modelling to the nematode Caenorhabditis elegans, a 1 mm-long nematode with just 302 neurons. After a brief introduction in Chapter 1, in chapter 2 we develop a quantitative and predictive description of motile behaviour and use it to study behaviour of a wide range of nematode species. Therefore, we construct a minimal 7-parameter model that captures the essential behaviours: speed, rotational, and reversal dynamics, including their fluctuations. We find that this model captures variation across individuals and a broad range of species within the Nematoda phylum. Interestingly, behaviour varies most prominently across a common mode, and moving along this mode strongly changes the exploratory propensity towards more roaming or more dwelling. In addition, variation across individuals is comparable to variation across species, which suggests a common underlying pathway. Chapter 3 focuses on the turning aspect of behaviour and asks what are the modes of control, and how the system is optimised to mitigate limits of control and intrinsic biases. We realise this by extracting and analysing postures from a large number of worms performing exploratory and escape tasks during two-hour recordings, leveraging naturally occurring variability in turning statistics across time and individuals under similar conditions. The results show that during exploration, worms exhibit a slowly fluctuating but persistent gradual rotational bias, curtailing their exploratory propensity. However, with a simple model, we show that the effective rate of random reorientation, on average, minimises the negative impact of the rotational bias, which could reflect a constrained optimization. Finally, we show how during escape responses, the worm exerts control over its sharp turn statistics, with respect to both direction and amplitude, to overcome its intrinsic biases that would be detrimental to escape. In Chapter 4 we investigate the neuronal signalling that underlies behaviour and its relationship to motility and sensory inputs. We develop a measurement-analysis pipeline that enables long timescale whole-brain recordings of brain dynamics with a simple one-dimensional behavioural output and the ability to provide temporally controlled chemical stimuli. With this system we investigate 3 hypotheses about C. elegans brain dynamics: (1) the collective motor-command hypothesis, which states that correlated activity of many neurons serve as motor commands, (2) the apparent stochasticity hypothesis, which states that individual neuron activity can appear stochastic due to influences of brain-wide dynamics, and (3) the neuromodulated brain-states hypothesis, which states that brain-wide activity states, such as sleep, can be triggered by neuromodulatory chemicals. Our results yield positive evidence in support of each of these hypothesis. The results presented in this thesis contribute to closing the aforementioned gap between understanding the how and why of behaviour. On the one hand, tools have been developed to quantify, model, and analyse motile behaviour in the absence and presence of stimuli and in the context of behavioural strategies. On the other hand, we have made inroads to studying how the brain encodes and processes information, under the influence of the same stimuli. This thesis has largely been an exploratory effort, where along the way many new interesting angles have been opened up for future studies.