A herbivore is often defined as any organism that eats only plants.
By that definition, many fungi, some bacteria, many animals, about 1% of flowering plants and some protists can be considered herbivores.
Many people restrict the term herbivore to animals.
Fungi, bacteria and protists that feed on living plants are usually termed plant pathogens.
Microbes that feed on dead plants are saprotrophs.
Flowering plants that obtain nutrition from other living plants are usually termed parasitic plants.
In zoology, an herbivore is an animal that is adapted to eat primarily plant matter (rather than meat).
Although such animals are sometimes referred to as being vegetarian, this term is more properly reserved for humans who choose not to eat meat as opposed to animals that are unable to make such choices.