The University of California Integrated Pest Management Program has produced a very informative poster for identifying good bugs that prey on bad bugs. We call these call good bugs, beneficial insects.
Meet the Beneficials: Natural Enemies of Garden Pests illustrates the various natural predators and parasites that feed on common garden pests.
One example is the lady beetle shown above. They are known to feed on aphids and whiteflies.
So before reaching for harmful pesticides consider biological controls such as beneficial insects to do the job instead.