This thesis lays a theoretical foundation for fault detection and tolerance in static walking of legged robots. Legged robots considered in this thesis have symmetric structures and legs which have the form of an articulated arm with three revolute joints. Two kinds of fault events, locked joint failures and broken link failures, are defined and their properties are closely investigated in the frame of gait study and robot kinematics. A locked joint failure is a failure which causes a joint of a leg locked in place and constrains the workspace of the failed leg. A broken link failure is a failure which breaks down or mutilates a link of a leg so that the failed leg cannot support the robot body and thus cannot be in the support state logically. As for locked joint failures, an algorithm of fault tolerant gaits for a quadruped robot is proposed in which the robot can continue its gait after a locked failure occurs to a joint of a leg. In order to overcome restrictions caused by the locked joint failure, the robot has discontinuous movements of the body with respect to leg swing, and the failed leg is moved passively by the translation of the robot body. A periodic gait is proposed as a special form of the proposed algorithm and its existence and efficiency are analytically proven. A case study on applying the proposed scheme to wave gaits verifies its capability. As for broken link failures, a new gait stability measure called the fault stability margin is defined to represent potential stability which a gait can have against a broken link failure. For a legged robot to be statically stable against a broken link failure, its fault stability margin should be nonnegative. Based on the fault stability margin, a fault tolerant quadruped gait sequence of a hexapod robot is proposed for the straight-line motion and crab walking on even terrain, respectively. The proposed gait sequence insures fault tolerance with respect to a broken link failure at any time during the locomotion. It is demonstrated that the derived quadruped gait is the optimal one for hexapod robots to have the maximum stride length in one cycle, maintaining the fault stability margin nonnegative. A geometric condition for guaranteeing feasibility of the proposed gait is derived. Gait sequences for the fault tolerant locomotion after the occurrence of a broken link failure are also proposed such that the legged robot preserves the optimal mobility or has the maximum stability margin. On the other hand, the fault tolerant gait on even terrain is extended to the gait over rough planar terrain. An improved fault tolerant gait is proposed based on the gait derived on even terrain, and its performance is verified on the straight-line motion and crab walking respectively. The improved gait has better mobility and terrain adaptability than previously developed gaits on even terrain. Using the proposed gait, we present a method for the generation of fault tolerant gaits of a hexapod robot over rough planar terrain. The proposed method minimizes the number of legs on the ground during walking, and foot adjustment algorithm is used for avoiding steps on forbidden regions. The effectiveness of the proposed strategy over rough planar terrain is demonstrated with a computer simulation.