Animal classification is the categorizing of animals and organisms hierarchically.
The ranking system is based on a fixed number of levels such as kingdom, family, or genus. The order goes:
Animal classification is based on an organisms decent from a common ancestor. Accordingly, the most important traits for classification are those inherited from a common ancestor. An example would be birds and bats, which both can fly, but this characteristic is not used to classify them into a class because they did not inherit this from a common ancestor. Despite their differences, both bats and whales feed their offspring milk, therefor this feature is used to classify them both as mammals.
*Note the similarities in bat and whale classification.