Carnivorous plants are green plants, often growing on soils that are low on nutrients. The plants produce Carbohydrates by photosynthesis jsut like normal plants but to obtain Nitrogen, Phosphorous and spore elements they catch living prey.
But if you think that they are all veracious green monsters that devour everything that comes in their way, you are wrong!
Yes they usually do catch and digest often insects, other arthropods and even occasionally vertebrates. A recent discovery for instance show that in Canada young salamanders fall prey to pitcher plants (Sarracenia purpurea). And personally I have been witness of the discovery of the remains of a shrew in a pitcher of Nepenthes attenboroughi on the Phillipines. However these two examples are just exceptions to the rule.
Vegetarian carnivores
Some carnivorous plants have even a (partially) vegetarian diet:
at least some of the aquatic bladderworts (Utricularia sp.) have algae and pollen as an important food source. This is in addition to small aquatic organism like waterfleas (Daphnia spp).
Another “vegetarian” is Nepenthes ampullaria. N. ampullaria can be considered to be detritivore living on leaves, The plant produces groups of lidless pitchers in the undergrowth of rainforests, often near ferns. The (fern)leaves are caught by the plant. Digestion takes place with the help of a small ecosystem present in the water filled pitchers. This include bacteria, mosquito larvae, other aquatic insect larvae and sometimes even crabs or frogs. The infauna of the pitchers helps the plant with the uptake the nutrients from the leaves.
Nepenthes bicalcarata is a species of pitcher plant with, like a contradiction in termini, a special relation with insects. It is often home to a species of ant that nest in the hollow tendrils of the plant. The ants (Camponotus schmitzii) act as a body guard: the remove weeds and pests from the plant. Amazingly the ants are able to dive into the pitcher fluid to feed on prey. As a result the nutrients from the prey can be used more efficiently by the plant.
Alternative food sources
Some Nepenthes species have an alternative source for their nitrogen and spore elements. A few species have a mutualistic relationship with mammals. Nepenthes hemlesyana from Borneo, is home small bats (Kerivoula hardwickii) see https://www.nature.com/articles/s41598-017-13535-5. The bats find a safe shelter in the adapted pitchers during daytime. In return the plant makes profit from the bat’s droppings that are a food source for the plant. Besides in N. hemlesyana these bats occasionally also roost in the closely related, but non specialized, pitchers of N. rafflesiana.
In the Bornean highlands some of the larger Nepenthes species act like a toilet: N. rajah, N. lowii and N. macrophylla secrete carbohydrates from their lids. This is a treat for the mountain tree shrew (Tupaia montanus) and the summit rat (Rattus baluensis). As they feed on the exudate, they often defecate. Just like N. hemlesyana the pitcher plants take up the nutrients from the scat. A few other Nepenthes species, e.g. N. jamban, resemble toilets, but whether they also collect scat is unknown.