The common housefly is not an animal, but an insect. It is an arthropod, a classification of insect.
Arthropods are animals with exoskeletons (external skeletons), segmented bodies, and jointed legs.
The fly's "class" is "Insecta." An insect is defined as...
...any animal of the class Insecta, comprising small, air-breathing arthropods having the body divided into three parts (head, thorax and abdomen) and having three pairs of legs and usually two pairs of wings.
Based on this definition, the fly is an insect. It has three main body parts: the head (with two "compound eyes" and three "simple" eyes); the thorax, which governs flight; and, the abdomen, used for digestion and reproduction.
The fly is also an insect because an actual fly has a pair of wings (hence its "order," Diptera, which means "two-winged). The fly also has three pairs of legs: one pair is located at the front of the body, facing forward; the next pair is found—one on either side of the body, at the middle; and, the third pair are located toward the back, facing backward.
While the fly aides in the natural decomposition of dead animals, it is also considered a "major pest." In feeding off of dead meat, it becomes a carrier of sixty-five diseases dangerous specifically to human beings such as...
...typhoid fever, dysentery, cholera, leprosy and tuberculosis.
For such a small insect—that lives at most a week and a half during the warmest summer months—the fly is responsible for spreading deadly diseases, which far outweighs the benefits it offers to the environment in breaking down dead animals.