In Parshat Korach, the earth opens up and swallows Korach and his followers. Then, a plague sweeps through the camp, killing over 17,000 men. Korach had organized a rebellion against Moshe, and consequently Hashem punished him. However, Korach's rebellion only involved 250 men; why were 17,000 killed, and why were two separate punishments given?
When Moshe challenged Korach to bring sacrifices to Hashem, all of Bnai Yisrael were watching. Seeing the conviction of Korach made many of them doubt Moshe. Even though they would not openly rebel, many hoped Korach would win (see Ramban). Infuriated by this lack of faith from the people He had saved over and over again, Hashem punished them. Even though most of Bnai Yisrael had not openly rebelled, they had lost faith, and it was tantamount to openly joining Korach's rebellion.
Three punishments were given to Bnai Yisrael. At the same time that the earth swallowed Korach, a heavenly fire came down to the Korbanot prepared by Aharon and Korach's followers and ignited Aharon's Korban. Instead of igniting the other Korbanot, however, the fire burned Korach and his followers. Bnai Yisrael still did not see how bad it was to rebel against Hashem, despite the fact that Korach's body was ablaze; therefore, it was swallowed by the earth in front of the whole nation.
Why were the other rebels not punished in the same way? If they had been punished in the same fashion, it would lessen the effect of the punishment on Bnai Yisrael. Unlike some non-Jewish theologies, which believes that it is evil even to contemplate sinning, the Torah says one is only punished for action. If the sinners and the doubters were punished in the same fashion, Hashem would have contradicted His laws. The plague on the doubters was not a direct punishment, since it did not discriminate between those who doubted and those who kept faith. Rather, it was a strong warning that Bnai Yisrael should act properly.