A narrative is heterodiegetic if the narrator is not a protagonist or if the narrator exists in a different sphere than the protagonist. Third-person narratives are most commonly associated with this term, but other narratives can be, such as you-narratives, they-narratives, and one-narratives.
A homodiegetic narrative is equivalent to a first-person narrative. If the narrator is the main protagonist, such as in an autobiography, that is called an autodiegetic narrative. That style of narration is different from a peripheral first-person narrator, in which a first-person narrator is a minor character. First-person narrators, whether homodiegetic or autodiegetic, are inherently limited in their perspective and are potentially untrustworthy.
These definitions come from Monika Fludernik’s An Introduction to Narratology, 2009. These definitions draw on the work of Gerard Genette and Franz K. Stanzel.