From Chabad.org: G‑d instructs Moses and Aaron: “Separate yourselves from the community, and I will destroy them in an instant.” And indeed, a plague struck the nation, and many thousands were dying. Moses tells Aaron to quickly take a firepan with incense and go into the midst of the congregation and atone for their sin. Aaron does so. He stands “between the living and the dead,” and the plague is halted.
Apparently the thought process of Korach and his men contaminated some others, and a plague started to cleanse this evil. But why use the very firepan and incense to atone and stop the plague, when that was the very item used to sin? the Medrash Agaddah explains that the Israelites were slandering and vilifying the incense, saying that it was a deadly poison. G-d’s response is to show them that the very incense that was used to sin is the incense that will save them, proving that it was the sin that caused their demise. Same action, different results. And the only difference is the thought process behind them.