What are carnivorous plants?
Carnivorous plants, such as Venus flytraps, sundews, and pitcher plants, live in nutrient-poor bogs. They catch and digest insects to obtain nutrients.
For example, consider the venus flytrap above. It is photosynthetic (if you look closely, you can see the green leaves in the background). It can therefore produce its own sugars, so it doesn't need to catch insects for energy.
When an insect lands on the red surface inside of the trap, it disrupts the needle-like triggers. The trap snaps shut, and the epidermis of the plant secretes enzymes that digest the insect. The plant absorbs phosphorus and nitrogen, which it uses to build molecules such as nucleic acids and ATP.
In contrast, non-carnivorous plants obtain nutrients from the soil. Traps are therefore an adaptation to living in nutrient-poor soils.