Animal locomotion control is in a large part based on central pattern generators (CPGs), which are neural networks capable of producing complex rhythmic patterns while being activated and modulated by relatively simple control signals. These networks are located in the spinal cord for vertebrate animals. In this talk, I will present how mathematical models and robots can be used as tools to get a better understanding of the functioning of these circuits. In particular I will present how we model CPGs of lower vertebrates (lamprey and salamander) using systems of coupled oscillators, and how we test the CPG models on board of amphibious robots, such as a new salamander-like robot capable of swimming and walking. I will also show how the concept of CPGs implemented as coupled oscillators can be a useful control paradigm for various types of articulated robots from snake to humanoid robots.