Humanoid robots are increasingly demanded to operate in interactive and human-surrounded environments while achieving sophisticated locomotion and manipulation tasks. To accomplish these tasks, roboticists unremittingly seek for advanced methods that generate whole-body coordination behaviors and meanwhile fulfill various planning and control objectives. Undoubtedly, these goals pose fundamental challenges to the robotics and control community. To take an incremental step towards reducing the performance gap between theoretical foundations and real implementations, we present a planning and control framework for the humanoid, especially legged robots, for achieving high performance and generating agile motions. A particular concentration is on the robust, optimal and real-time performance. This framework constitutes three hierarchical layers: First, we present a robust optimal phase-space planning framework for dynamic legged locomotion over rough terrain. This framework is a hybrid motion planner incorporating a series of pivotal components. Second, we take a step toward formally synthesizing high-level reactive planners for whole-body locomotion in constrained environments. We formulate a two-player temporal logic game between the contact planner and its possibly-adversarial environment. Third, we propose a distributed control architecture for the latency-prone humanoid robotic systems. A central experimental phenomenon is observed that the stability of high impedance distributed controllers is highly sensitive to damping feedback delay but much less to stiffness feedback delay. We pursue a detailed analysis of the distributed controllers where damping feedback effort is executed in proximity to the control plant, and stiffness feedback effort is implemented in a latency-prone centralized control process.