This page will help you answer a few of these questions, and maybe to come up with more questions. First of all, fireflies are not flies at all. Most are beetles in a family called Lampyridae.
Flies have only one pair of wings.
Other insects that have wings have two pairs of wings. When an insect's common name ends with fly, as in dragonfly or stonefly, it usually is not a fly at all. If its name has fly as a separate word, like house fly of fruit fly, it usually is a real fly. Fireflies are also sometimes called lightning bugs or glowworms. Common names can be confusing.