They're called beneficial insects. These insects include praying mantises, ladybugs, ladybird beetles, green lacewings, predatory and parasitic wasps, and more. Each has it's own way of killing off the bad insects. They eat them, poison them, and some even make them hosts for their eggs, which also kills off the bad insect. Lacewings eat aphids, spider mites, small caterpillars and insect eggs.
Spiders catch their unsuspecting prey with their sticky webs.
Other beneficial insects include nematodes and trichogramna. Nematodes are tiny worm-like creatures that live in the soil. They are parasites to soil-born insects' larvae, but do not harm earthworms or plants. Trichogramna are very small insects that belong to the wasp family. They feed on caterpillar eggs.