Current robots and other artificial systems are typically able to accomplish only one single task. Overcoming this limitation requires the development of control architectures and learning algorithms that can support the acquisition and deployment of several different skills, which in turn seems to require a modular and hierarchical organization. In this way, different modules can acquire different skills without catastrophic interference, and higher-level components of the system can solve complex tasks by exploiting the skills encapsulated in the lower-level modules. While machine learning and robotics recognize the fundamental importance of the hierarchical organization of behavior for building robots that scale up to solve complex tasks, research in psychology and neuroscience shows increasing evidence that modularity and hierarchy are pivotal organization principles of behavior and of the brain. They might even lead to the cumulative acquisition of an ever-increasing number of skills, which seems to be a characteristic of mammals, and humans in particular. This book is a comprehensive overview of the state of the art on the modeling of the hierarchical organization of behavior in animals, and on its exploitation in robot controllers. The book perspective is highly interdisciplinary, featuring models belonging to all relevant areas, including machine learning, robotics, neural networks, and computational modeling in psychology and neuroscience. The book chapters review the authors' most recent contributions to the investigation of hierarchical behavior, and highlight the open questions and most promising research directions.