The difference between epistemology and ontology in part is the subject that is being studied by each. In ontology, the study of being or existence and questions of what kinds of entities exist are studied. In epistemology, the study of knowing and how we come to know and questions about what knowledge is and how knowledge is possible are studied.
Both ontology and epistemology are branches of philosophy. Ontology is a type of metaphysics. Epistemology often involves a debate between empiricism and rationalism, in which the former claims knowledge can only be gained through experience whereas the latter believes that knowledge can be acquired through reason alone.
Ontology concerns itself with what is true, and on the other hand, epistemology involves the different methods of figuring out that truth. Put in other words, ontology is about the nature of reality and epistemology is about the relationship between the researcher or other person and that reality.
Many issues have multiple, often conflicting ontologies, or theories about what is true, as well as various epistemologies, or ways of figuring things out. For example, science and religion have oppositional ontologies and epistemologies about the existence of God and the origins of the universe.