Metaphysics is the branch of philosophy that focuses on the nature of reality. It also includes questions of free will and identity. Ontology is the sub-branch of metaphysics that focuses on questions about the nature of being and existence.
The field of Philosophy which studies metaphysics deals with the nature of matter/material existence. There are two tracks to metaphysical inquiry: One is the exploration of the nature of free will and identity. The other looks at the nature of being and existence.