Legged robots have gained an increased attention these past decades since they offer a promising technology for many applications in unstructured environments where the use of wheeled robots is clearly limited. Such applications include exploration and rescue tasks where human intervention is difficult (e.g. after a natural disaster) or impossible (e.g. on radioactive sites) and the emerging domain of assistive robotics where robots should be able to meaningfully and efficiently interact with humans in their environment (e.g. climbing stairs). Moreover the technology developed for walking machines can help designing new rehabilitation devices for disabled persons such as active prostheses. However the control of agile legged locomotion is a challenging problem that is not yet solved in a satisfactory manner. By taking inspiration from the neural control of locomotion in animals, we develop in this thesis controllers for legged locomotion. These controllers are based on the concept of Central Pattern Generators (CPGs), which are neural networks located in the spine of vertebrates that generate the rhythmic patterns that control locomotion. The use of a strong mathematical framework, namely dynamical systems theory, allows one to build general design methodologies for such controllers. The original contributions of this thesis are organized along three main axes. The first one is a work on biological locomotion and more specifically on crawling human infants. Comparisons of the detailed kinematics and gait pattern of crawling infants with those of other quadruped mammals show many similarities. This is quite surprising since infant morphology is not well suited for quadruped locomotion. In a second part, we use some of these findings as an inspiration for the design of our locomotion controllers. We try to provide a systematic design methodology for CPGs. Specifically we design an oscillator to independently control the swing and stance durations during locomotion, then using insights from dynamical systems theory we construct generic networks supporting different gaits and finally we integrate sensory feedback in the system. Experiments on three different simulated quadruped robots show the effectiveness of the approach. The third axis of research focus on dynamical systems theory and more specifically on the development of an adaptive mechanism for oscillators such that they can learn the frequency of any periodic signal. Interestingly this mechanism is generic enough to work with a large class of oscillators. Extensive mathematical analysis are provided in order to understand the fundamental properties of this mechanism. Then an extension to pools of adaptive frequency oscillators with a negative feedback loop is used to build programmable CPGs (i.e. CPGs that can encode any periodic pattern as a structurally stable limit cycle). We use the system to control the locomotion of a humanoid robot. We also show applications of this system to signal processing.