Herbivores are the primary consumers which are consumed by secondary and consumers which can be omnivores or carnivores and food chain continues.
Explanation:
Herbivores are the animals that rely on plants for their nutrition or food.
Carnivore are the animals that prey upon herbivore to survive.
In food chain plants are the producers which forms glucose by the process of photosynthesis using sunlight.
The energy rich compound is transferred to primary consumer or herbivores by eating these plants.
In the food chain or wood web the carnivores are secondary and tertiary consumers. As the pyramid goes to the higher level the number of creatures or organisms decrease and energy transferred also increases.
Thus relation between herbivores and carnivore is that carnivore feed upon biomass of herbivore.