When the insects appeared on Earth, they could not fly. One insect line out of the many existing in the Paleozoic Era somehow evolved wings in the adult stage. The first species with wings looked more like those classified today as paleoptera (Greek for "old-winged"). For the first time, creatures appeared on Earth that did not have to stay forever on the ground. The niche of flight was taken, and flying insects enjoyed extensive diversification. Dragonflies and their kin reached enormous sizes at some point in evolutionary time. Their characteristic is that they cannot fold their wings; they keep them always extended. Descendants of the earlier, flightless insects are the species belonging to the subclasses microcoryphia (jumping bristletails), and thysanura (silverfish, etc.)
A little later, still in the Paleozoic Era, a lineage among the insects that could fly evolved the ability to fold their wings back over the body when not in flight. This gave them greater mobility on the ground, and an advantage in hiding and searching for food, over other insects that had to keep their wings spread. This was the subclass neoptera ("newly-winged"), which enjoyed further extensive diversification, and resulted in most insect species with which we are familiar today. If you descend to the subclass neoptera, you'll read what further evolutionary advances occurred within that group.
Life on Earth