Summary. In this paper key aspects and several methods for modeling, simulation, optimization and control of the locomotion of humanoid robots and humans are discussed. Similarities and differences between walking and running of humanoid robots and humans are outlined. They represent several, different steps towards the ultimate goals of understanding and predicting human motion by validated simulation models and of developing humanoid robots with human like performance in walking and running. Numerical and experimental results are presented for modelbased optimal control as well as for hardware-in-the-loop optimization of humanoid robot walking and for forward dynamics simulation and optimization of a human kicking motion.