Wayne Grey (Seann William Scott), a trainee firefighter in Arizona, practices fire rescue and resuscitation in a shack near Glen Canyon, where a meteor lands in a cavern.
College professor Ira Kane (David Duchovny) and his colleague, geology Professor Harry Block (Orlando Jones), investigate, taking a sample of strange blue liquid that oozes from it. Ira discovers that it harbors extraterrestrial nitrogen-based life that condense millions of years of evolution within a matter of hours: the very next day, they take the science class to survey the meteorite site and find it already surrounded by evolved oxygen-converting fungi and alien flatworms that cannot breathe oxygen. Ira and Harry discover that even the multicellular organisms reproduce through mitosis after seeing one of the flatworms they collected in a jar split into two. Grey later encounters a small piranha-like creature in a water tank while cleaning a swimming pool.
The site is soon sealed off by the Army. Ira and Harry take General Russell Woodman (Ted Levine) and the clumsy CDC Dr. Allison Reed (Julianne Moore) to court for the right to be part of the research of their discovery, but their efforts fail when it is revealed Ira was discharged from the army after creating an anthrax vaccine that led to terribly debilitating side effects, which the soldiers dubbed "The Kane Madness". Woodman steals Ira and Harry's research, forcing them to infiltrate the base to get another sample; they find in the oxygen-free caverns an alien rainforest teeming with plant and animal life had spawned from the original flatworms and fungi. They are caught by Allison as a mosquito-like alien gets inside Harry; they are forced to rectally remove the mosquito, which then dies upon exposure to oxygen.
Wayne arrives at the college and shows the two the dead body of an amphibian alien which killed a country club owner before eventually suffocating; they later investigate a dead frog-like alien in a woman's home and more dead flatworms. They find a valley behind the home filled with dead dragon-like aliens; Ira and Harry theorize the aliens are spreading through the caves connected to the main cavern. One of the dying creatures spits out a pod containing a newborn, which then hatches into an oxygen-tolerant alien, which then flies away and forces the team to pursue it. The alien attacks a mall, where it carries off a shoplifter until Ira, Harry, and Wayne shoot it down.
Other alien encounters also make the news, forcing the Governor of Arizona (Dan Aykroyd) to demand answers. Allison explains that the aliens will engulf the United States in two months; and Woodman attempts to blame Ira, especially when Ira, Harry and Wayne arrive. When the governor demands a solution, Woodman suggests a napalm strike, despite protests from Ira and Allison that they don't know how the aliens will react. At that moment, primate-like aliens attack them, but are fought off; the shaken governor approves Woodman's plan. A disgusted Allison quits the CDC and leaves the site, procuring Ira's original research and samples for him.
At the college, Harry accidentally tosses a match into a Petri dish of alien liquid, causing an amoeba-like mass to rapidly grow from it. Ira realizes heat triggers the aliens' DNA, and the meteor crashing to earth activated it; Allison attempts to warn Woodman, but he ignores her call completely. Looking at the positions of nitrogen and carbon on the periodic table, Ira theorizes that selenium might be poisonous to the aliens as arsenic is to Earth's carbon life. Much to Ira's surprise, his dumbest students Deke and Danny Donald (Ethan Suplee and Michael Ray Bower) recall that selenium sulfide is the active ingredient in Head & Shoulders; this makes Ira award the two with A's, much to their excitement, and them to tag along.
Wayne procures a firetruck and the team fills it with the shampoo, with help from the college students. But just as the team arrives at the cave and prepare to use the fire hoses, Woodman's napalm strike goes off ahead of schedule, triggering the entire ecosystem, including the ape-like aliens, to fuse together into a single immense amoeba-like blob. While the resulting mass begins mitosis, the team drives under it and finds what looks like a rectal hole to inject the shampoo into; Harry, intending to settle a score for his rectal incident, sprays the load into the creature himself, causing it to explode. The governor declares Ira, Harry, Wayne and Allison heroes; Wayne is made a fully credentialed firefighter, while Ira and Allison skip the festivities for sex in the fire truck.
Later, Harry, Ira and Wayne are shown promoting Head & Shoulders for both hair care and fighting the aliens.
David Duchovny as Colonel (Ret.) Dr. Ira Kane
Julianne Moore as Dr. Allison Reed
Orlando Jones as Professor Harry Phineas Block
Seann William Scott as Wayne Grey
Ted Levine as General Russell Woodman
Ethan Suplee as Deke Donald
Michael Bower as Danny Donald
Pat Kilbane as Officer Sam Johnson
Ty Burrell as Colonel Flemming
Dan Aykroyd as Governor Lewis
Katharine Towne as Nadine
Gregory Itzin as Barry Cartwright
Ashley Clark as Lieutenant Cryer
Stephanie Hodge as Jill Mason