There are many ways to classify cheese; but, most people tend to look at two characteristics: milk type and texture.
Milk type
A cheese might be made with cow, sheep, goat, buffalo milk, etc. or, even be a mix of two or more milks.
The major factors in distinguishing between different types of milk are their protein and butterfat content. Goat’s milk has the lowest butterfat percentage, which tends to yield a product that’s more tangy and acidic. On the other hand, water buffalo milk has the highest amount a butterfat which lends itself to rich, creamy cheeses like mozzarella. Cow’s and sheep’s milk cheeses fall somewhere in between.
Adam Goddu, Murray's Cheese expert on mental_floss
Texture
There are many different kinds of cheeses, but most of them fit nicely into one of the following seven categories, based on firmness and cheese ripening method:
The main determining factor in firmness is moisture content, which can be affected by the pressure on the curds as they’re packed into blocks or wheels, and by the length of time a cheese is aged. And because aging time will definitely affect a cheese’s flavor, at least an indirect correlation can be made between texture and flavor.
The Wisconsin Cheeseman, Types of Cheese: Texture Talk