Korach assembles Datan, Aviram and On, along with 250 other men from the tribe of Reuven, and leads a rebellion against Moshe's leadership of the nation (in fact, On did not fight against Moshe, but withdrew from the fight after discussion with his wife). He claims that everyone heard G-d at Mount Sinai, and therefore everyone is equally able to lead the Israelites. Moshe, in consulatation with G-d, tells the rebels to make incense pans and to prepare incense on them, to see who's offering G-d chooses to accept. He privately summons Korach and tries to dissuade him from leading this revolt. He also summons Datan and Aviram, but they refuse to come to speak to him. G-d tells Moshe to separate the people from the tents of Korach, Datan and Aviram. G-d makes the earth open its mouth and swallow Korach, Datan and Aviram, all their families, and all that belonged to them. A flame descends from heaven and consumes the 250 men who were offering the incense.
G-d commands Moshe to tell Elazar (Aaron's son) to gather up the fire-pans. They are hammered out and made into a covering for the altar. This acts as a reminder to everyone else that only Aharon and his descendants the Cohanim may offer incense before G-d.
The entire assembly of Israel gathers the next day and complains that Moshe and Aharon are killing off the nation. Immediately a plague begins killing the people. Moshe tells Aharon to intercede by offering incense, and thus appease G-d's anger. Aharon stands between the living and the dead, offers the incense and stops the plague.
G-d then instructs Moshe to bring a new proof of Aharon's greatness. Each tribe should bring a staff inscribed with the name of the leader of that tribe. The staff of Levi should have Aharon's name on it. All the staffs are placed in the Mishkan overnight. In the morning when Moshe enters, Aharon's staff has blossomed and brought forth buds, ripening into almonds. Moshe brings out the staffs, and each leader takes his staff. The staff of Aharon was kept as a safekeeping and a reminder to prevent any future claims against Aharon.
G-d reiterates the duties of the Cohanim. They shall perform all of the sacrifices in the Temple. Any non-Kohen who performs these tasks shall die at the hands of heaven. G-d awards a portion from every sacrifice to the Cohanim. They shall also receive a tithe of the first fruits and crops. Every firstborn animal shall be given to the Cohanim. Part of it is offered on the altar and the rest of the meat belongs to the Kohen. The Cohanim will not receive a share in the Land of Israel because G-d alone is their portion.
The Levi'im receive a tithe of ten percent from all produce in return for the service that they perform in the Temple. From this tithe the Levi'im must take ten percent and give that to the Cohanim.