The phlogiston theory is a superseded scientific theory that postulated that a fire-like element called phlogiston  is contained within combustible bodies and released during combustion. The name comes from the Ancient Greek phlogistón (burning up), from ? phlóx (flame). It was first stated in 1667 by Johann Joachim Becher and then put together more formally by Georg Ernst Stahl. The theory attempted to explain processes such as combustion and rusting, which are now collectively known as oxidation.
Phlogiston theory states that phlogisticated substances are substances that contain phlogiston and dephlogisticate when burned. Dephlogisticating is the process of releasing stored phlogiston, which is absorbed by the air. Growing plants then absorb this phlogiston, which is why air does not spontaneously combust and also why plant matter burns as well as it does.
Thus phlogiston accounted for combustion via a process that was opposite to that of the oxygen theory.
In general, substances that burned in air were said to be rich in phlogiston; the fact that combustion soon ceased in an enclosed space was taken as clear-cut evidence that air had the capacity to absorb only a finite amount of phlogiston. When air had become completely phlogisticated it would no longer serve to support combustion of any material, nor would a metal heated in it yield a calx; nor could phlogisticated air support life. Breathing was thought to take phlogiston out of the body.
Joseph Black's student Daniel Rutherford discovered nitrogen in 1772 and the pair used the theory to explain his results. The residue of air left after burning, in fact a mixture of nitrogen and carbon dioxide, was sometimes referred to as phlogisticated air, having taken up all of the phlogiston. Conversely, when Joseph Priestley discovered oxygen, he believed it to be dephlogisticated air, capable of combining with more phlogiston and thus supporting combustion for longer than ordinary air.
Empedocles had formulated the classical theory that there were four elements: water, earth, fire and air, and Aristotle reinforced this idea by characterising them as moist, dry, hot and cold. Fire was thus thought of as a substance and burning was seen as a process of decomposition which applied only to compounds. Experience had shown that burning was not always accompanied by a loss of material and a better theory was needed to account for this.
In 1667, Johann Joachim Becher published his book Physica subterranea, which contained the first instance of what would become the phlogiston theory. In his book, Becher eliminated fire, water, and air from the classical element model and replaced them with three forms of earth: terra lapidea, terra fluida, and terra pinguis.Terra pinguis was the element that imparted oily, sulphurous, or combustible properties. Becher believed that terra pinguis was a key feature of combustion and was released when combustible substances were burned. Becher did not have much to do with phlogiston theory as we know it now, but he had a large influence on his student Stahl. Becher's main contribution was the start of the theory itself, however much it was changed after him. Becher's idea was that combustible substances contain an ignitable matter, the terra pinguis. 
In 1703 Georg Ernst Stahl, professor of medicine and chemistry at Halle, proposed a variant of the theory in which he renamed Becher's terra pinguis to phlogiston, and it was in this form that the theory probably had its greatest influence. The term phlogiston itself was not something that Stahl invented. There is evidence that the word was used as early as 1606, and in a way that was very similar to what Stahl was using it for. The term was derived from a Greek word meaning to inflame. The following paragraph describes Stahl's view of phlogiston:
To Stahl, metals were compounds containing phlogiston in combination with metallic oxides (calces); on ignition the phlogiston was freed from the metal leaving the oxide behind. When the oxide was heated with a substance rich in phlogiston, such as charcoal, the calx again took up phlogiston and regenerated the metal. Phlogiston was a definite substance, the same in all its combinations.
Stahl's first definition of phlogiston first appeared in his "Zymotechnia fundamentalis", published in 1697. His most quoted definition was found in the treatise on chemistry entitled "Fundamenta chymiae" in 1723. According to Stahl, phlogiston was a substance that was not able to be put into a bottle, but could be transferred nonetheless. To him, wood was just a combination of ash and phlogiston, and making a metal was as simple as getting a metal calx and adding phlogiston.Soot was almost pure phlogiston, which is why heating it with a metallic calx transforms the calx into the metal and Stahl attempted to prove that the phlogiston in soot and sulphur were identical by converting sulphates to liver of sulphur using charcoal. He did not account for the increase in weight on combustion of tin and lead that were known at the time.
Johann Heinrich Pott, a student of one of Stahl's students, expanded the theory and attempted to make it much more understandable to a general audience. He compared phlogiston to light or fire, saying that all three were substances whose natures were widely understood but not easily defined. He thought that phlogiston should not be considered as a particle but as an essence that permeates substances, arguing that in a pound of any substance one could not simply pick out the particles of phlogiston. Pott also observed the fact that when certain substances are burned they increase in mass instead of losing the mass of the phlogiston as it escapes; according to him, phlogiston was the basic fire principle and could not be obtained by itself. Flames were considered to be a mix of phlogiston and water, while a phlogiston-and-earthy mixture could not burn properly. Phlogiston permeating everything in the universe, it could be released as heat when combined with acid. Pott proposed the following properties:
Pott's formulations proposed little new theory; he merely supplied further details and rendered existing theory more approachable to the common man.
Johann Juncer also created a very complete picture of phlogiston. When reading Stahl's work, he assumed that phlogiston was in fact very material. He therefore came to the conclusion that phlogiston has the property of levity, or that it makes the compound that it is in much lighter than it would be without the phlogiston. He also showed that air was needed for combustion by putting substances in a sealed flask and trying to burn them.
Guillaume-Francois Rouelle brought the theory of phlogiston to France, and he was a very influential scientist and teacher so it gained quite a strong foothold very quickly. Many of his students became very influential scientists in their own right, Lavoisier included. The French viewed phlogiston as a very subtle principle that vanishes in all analysis, yet it is in all bodies. Essentially they followed straight from Stahl's theory.
Giovanni Antonio Giobert introduced Lavoisier's work in Italy. Giobert won a prize competition from the Academy of Letters and Sciences of Mantua in 1792 for his work refuting phlogiston theory. He presented a paper at the Académie royale des Sciénces of Turin on March 18, 1792 entitled "Examen chimique de la doctrine du phlogistique et de la doctrine des pneumatistes par rapport à la nature de l 'eau" (translates roughly to Chemical examination of the doctrine of phlogiston and the doctrine of pneumatists in relation to the nature of water), which is considered the most original defense of Lavoisier's theory of water composition to appear in Italy.
Eventually, quantitative experiments revealed problems, including the fact that some metals gained mass when they burned, even though they were supposed to have lost phlogiston. Some[who?] phlogiston proponents explained this by concluding that phlogiston had negative weight; others, such as Louis-Bernard Guyton de Morveau, gave the more conventional argument that it was lighter than air. However, a more detailed analysis based on Archimedes' principle, the densities of magnesium and its combustion product showed that just being lighter than air could not account for the increase in mass. Stahl himself did not address the problem of the metals that burn gaining weight, but those who followed his ideas and did not question his ideas were the ones that worked on this problem.
During the eighteenth century, as it became clear that metals gained mass when they were oxidized, phlogiston was increasingly regarded as a principle rather than a material substance. By the end of the eighteenth century, for the few chemists who still used the term phlogiston, the concept was linked to hydrogen. Joseph Priestley, for example, in referring to the reaction of steam on iron, while fully acknowledging that the iron gains mass as it binds with oxygen to form a calx, iron oxide, iron also loses "the basis of inflammable air (hydrogen), and this is the substance or principle, to which we give the name phlogiston." Following Lavoisier's description of oxygen as the oxidizing principle (hence its name, from Ancient Greek: oksús, "sharp;" génos, "birth," referring to oxygen's supposed role in the formation of acids), Priestley described phlogiston as the alkaline principle.
Phlogiston remained the dominant theory until the 1770s when Antoine-Laurent de Lavoisier showed that combustion requires a gas that has mass (specifically, oxygen) and could be measured by means of weighing closed vessels. The use of closed vessels also negated the buoyancy that had disguised the mass of the gases of combustion. These observations solved the mass paradox and set the stage for the new oxygen theory of combustion.Elizabeth Fulhame demonstrated through experiment that many oxidation reactions occur only in the presence of water, that they directly involve water, and that water is regenerated and is detectable at the end of the reaction. Based on her experiments, she disagreed with some of the conclusions of Lavoisier as well as with the phlogiston theorists that he critiqued. Her book on the subject appeared in print soon after Lavoisier's execution for Farm-General membership during the French Revolution.
Experienced chemists who supported Stahl's phlogiston theory attempted to respond to the challenges suggested by Lavoisier and the newer chemists. In doing so, phlogiston theory became more complicated and assumed too much, contributing to the overall demise of the theory. Many people tried to remodel their theories on phlogiston in order to have the theory work with what Lavoisier was doing in his experiments. Pierre Macquer reworded his theory many times, and even though he is said to have thought the theory of phlogiston was doomed, he stood by phlogiston and tried to make the theory work.