It depends. Different kinds of crabs have different legs. For example, the swimming crab has eight legs and a pair of spiny feet; King crab has six legs and a pair of spiny feet. Crab is a crustacean, belonging to the mollusk class Decapoda. Its body is protected by a hard shell and it breathes through its gills. Taxonomically, it is similar to shrimp, lobster and hermit crab.