Both are attached to the thorax. On some insects the thorax is also useful for hearing. Now, what if you find two bugs. They both have three body sections, six legs, and two antennae. But one bug has wings and the other one does not.
Insects are the only arthropod to have wings.
But not every insect has them. All insect wings are connected to the thorax. The thorax is very important because it helps all insects walk, run and fly. The abdomen is the last part of the insect. It's very important.