The thorax is the middle body region of insects and contains three segments - the prothorax, mesothorax, and metathorax. Each segment contains a pair of legs and, in many adult insects, one or two pairs of wings. The thorax houses muscles that power the legs and wings. It is composed of rigid exoskeleton plates on the dorsal, ventral, and lateral sides of each segment. The thorax contains three pairs of legs and, in most adult insects, one or two pairs of wings that are adapted for functions like flight, protection, and sensory roles.