In the nineteenth century, people believed that organisms could arise spontaneously from their environment, without the presence of any preexisting organisms. After a nutrient broth is sterilized by boiling, and then exposed to air for a few days, a sample can be removed from the flask and transferred to a plate containing a solid medium. Within a few hours, the plate contains colonies of bacteria (dots) that presumably developed from the air that entered the flask. According to the spontaneous generation hypothesis, the dots in the dish are bacteria that arose spontaneously, without the need for pre-existing bacteria. From experiments like this, one could conclude that the hypothesis of spontaneous generation is correct and should be accepted. Louis Pasteur believed that something was actually carrying bacteria into the flask, and decided to test his own hypothesis.
Louis Pasteur did not believe the spontaneous generation theory was correct. He designed a simple, controlled experiment to test his own hypothesis, which was that the bacteria were carried into the flask by dust particles in the air.
In the first flask of boiled broth, he left the flask uncovered and the bacteria did grow as expected. In the second flask, Pasteur used a control group; he covered the flask so no air or particles would enter, and indeed no bacteria would grow.
In the last flask, he heated and bent the neck of the flask into an S-curve, so that bacteria carried by dust would not be able to enter the flask but air could get inside, disproving the popular idea that air was the cause of spontaneous generation. No bacteria grew.
From these results, Pasteur was convinced that spontaneous generation was a false hypothesis that should be rejected.