One can differentiate between different Types of Ontologies by looking
how general the Concepts are represented by an Ontology. An Ontology is an explicit formal Representation of a shared Conceptualizations. Of course, it must be somehow specific, but on the other hand how general the single Concepts or Classes or that are represented by the Model decides how much of the real world will be covered by this Model.
An upper level the are the Top-Level Ontologies that are most general. Here are cross-Domain Ontologies that represent not only one specific domain, but are general as they represent the entire world and represent, for example, very general Concepts like Time, Space, Events and are absolutely independent from a specific Domain or Problem.
They are similar to the Tree of Knowledge in Ontology of the Philosophy as this was something that tried to put the world into single draws of Categories and Concepts, i.e. a Top-Level/Upper Ontology.
Most times one is dealing with specific domains, therefore one does not need the entire knowledge of the world, one only needs the knowledge of a specific Domain. Here are the Domain Ontologies which means there one describes fundamental concepts according to a generic domain. So these are smaller Ontologies according to the domain or subject, they also can be complex, but they do not represent general abstract Concepts as they are focused on a specific domain.
On the other hand an Ontology might cover several Domains, but all these domains might be included in a specific Class or a specific Process. To model this process one can describe Task Ontologies where one describes fundamental Concepts according to a general activity or general task.
If one combines both, i.e. one is looking at a specific domain and a specific task at the same time to model, then one has the most restricted form of an Ontology. Here one is talking about Application Ontologies. For example a recipe book, there an Ontology corresponds to an recipe where one prepares a special or specific dish. So this is a rather specialized Ontology focused on specific tasks and specific domains, thus it is the most specific form, the Application Ontology. In most times one is dealing with Application Ontologies as one is looking at a specific Domain and a specific Task to solve and this restricts the knowledge that one has to provide this Application working.
Top-Level Ontology(Upper Ontology, Foundation Ontology)
This is only one method to distinguish Ontologies by their type of granularity of generalization. One can also distinguish Ontology by their Semantic Expressivity which is another type of differentiation.