Plants can absorb harmful substances from the air, such as carbon dioxide. When this happens, it is called photosynthesis. Besides carbon dioxide, plants also absorb other things such as water, light, etc.
This process takes place with plants, algae and various kinds of bacteria (cyanobacteria). The plants successfully absorb harmful things like carbon dioxide and convert them naturally into energy—as organic compounds like sugar. By using carbon dioxide and water, plants are able to produce oxygen, which the plant releases as waste, which is obviously a positive outcome for air-breathing creatures like human beings.
When global warming began, the introduction of aerosol particles into the environment led to a growing concern of the affects of these particles on the earth because of the reduction of sunlight (called "global dimming") they caused. However, a recent article in ScienceDaily notes that plants are doing better than ever under these conditions, probably better than they did a hundred years ago. Instead of getting direct sunlight, plants are bathed in a scattered, reflected light, which is better for the plant.
As scientists find ways to clean up the environment, they will now need to study the effects the clean up will have on the world—in particular, plants, as plants continue to remove dangerous substances from the world around us—scientists will not want this to change.
I believe the process you are asking about is called bioremediation which uses biological organisms--aka living plants or bacteria--to solve an environmental problem such as contaminated soil, surface water, or groundwater. The US EPA defines this process as 'microbial organisms transforming or altering the structure of chemicals introduced into the environment'.
Bioremediation provides an alternative way to clean up pollution safely and inexpensively. The alternatives to bioremediation are usually landfilling or incinerating contaminated material, however plants or bacteria can be used to either sequester or breakdown a harmful pollutant. This process has the advantage of treating the contamination on site so that soil, sediment or water don't have to be dug up or pumped out of the ground for treatment.