The word "fly", such as butterflies, are not related to the "fly" zoological order (Diptera).

The word "fly" has a non-technical meaning and a zoological meaning.

What we name fly in common usage is any of the insects of the family Muscidae.

Mosquitoes are common flying insects in the family Culicidae.

In the scientific sense, flies are all insects of the order Diptera, which contains among others, the families Muscidae and Culicidae.