Wayne Grey (Seann William Scott), a fireman trainee practicing in a shack in the desert near Glen Canyon, Arizona, sees a meteor strike his car and land in an underground 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 single-celled nitrogen-based organisms multiplying exponentially, condensing millions of years of evolution within a matter of hours. The next day, they take the science class to survey the meteor site and find it already surrounded by evolved oxygen-converting fungi and alien flatworms, later discovering the cells and organisms reproduce rapidly through mitosis.
Soon Ira and Harry find the site sealed off by the Army, who have set up a base. They take General Russell Woodman (Ted Levine) and the clumsy 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 brought up that Ira was previously discharged from the army after creating an anthrax vaccine which led to terrible physical disorders, dubbed "The Kane Madness". When Woodman confiscates their research, Ira and Harry infiltrate the base underground to get another sample and find an alien rainforest teeming with life. They are caught by Allison as an alien insect gets inside Harry's body, which has to be removed rectally by a doctor, and immediately dies.
Wayne arrives at the college and shows the two the dead body of an amphibian alien which killed a country club owner, while another creature appeared in a woman's home before dying. Ira and Harry theorize the aliens are spreading through the caves connected to the main cavern but cannot breathe oxygen. The trio later find a valley from the caves strewn with dead flying dinosaur-like creatures, one of which gives birth before it dies. The newborn alien is able to breath the oxygen safely and flies away to a mall, where it snatches up a shoplifter before the trio gun it down.
The Governor of Arizona (Dan Aykroyd) demands to know what is happening. Allison explains that in two months the aliens will spread and multiply enough to engulf the entire United States. Woodman proposes a plan to evacuate the area and use napalm to burn the aliens away, when Ira, Harry and Wayne arrive to tell them about their findings. The aliens, now evolved into primate-like creatures, climb up from the caves below and attack them, but are fought off. The shaken governor then approves Woodman's plan against protests from Ira and Allison that they don't know how the aliens will react. Allison leaves the site, procuring Ira's original research and samples of the blue liquid for him.
At the college, Harry accidentally tosses a match into the petri dish of alien liquid, causing a mass of flesh to rapidly grow from it. Ira realizes that heat is the catalyst to their evolution, as it activated the dormant alien cells when the meteor entered the atmosphere. They attempt to warn Woodman that the effects of napalm will be disastrous, but are rebuffed. Looking at the positions of nitrogen and carbon on the periodic table, Ira theorizes that selenium might be poisonous to the aliens, since they are nitrogen-based, as arsenic is poisonous to Earth's carbon life. Ira's students Deke and Danny (Ethan Suplee and Michael Ray Bower) recall that selenium sulfide is the active ingredient in Head & Shoulders shampoo, so the team procures a firetruck and fills it with the shampoo.
Woodman begins the napalm strike, causing the aliens to rapidly mutate and merge into a gargantuan amoeba-like organism that bulges out of the caves. As it prepares to divide via mitosis, the team drives under the organism and pumps a firehose of shampoo into its rectal hole, causing it to explode. Governor Lewis declares Ira, Harry, Wayne and Allison heroes, making Wayne an honorary firefighter while Ira and Allison skip the festivities for romance in the fire truck. Later, Harry, Ira and Wayne promote Head & Shoulders for both hair care and fighting aliens.