Work on the elements has spanned the centuries, and is interwoven with the advance of spiritual and philosophical theories, as well as the recent advance of technology. The so-called PreSocratics? argued the primary analog for the universe as either earth (parmenides), air (anaxemenes), water (thales) or fire (heraclitus).
Theories of the primary, or elemental, substances were re-discovered and revised throughout history. Prior to the current analogy we use (periodic table of some hundred+ elements), alchemists sought a redefinition of the basic substances. They decided on Salt, Sulphur and Mercury (or quicksilver) as the three basic substances, in part for allegorical/astrological/spiritual reasons, as alchemical engravings from those times attest.
So anyway, the Phlogiston theory was built upon this earlier, alchemical understanding of the primary substances. It is attributed to Georg Ernst Stahl (1660-1734).
In order to explain the phenomena of heat and combustability, stahl did what many scientists do, he invented invisible, undetectable substances. (compare to sub-atomic physics these days)
Different materials contained different amounts/concentrations of "phlogiston" that could account for the relative "burnability" of various materials. When something burned, its phlogiston was released into the air. Keep in mind, this was before anyone had heard of "oxygen."
The jist of the phlogiston theory was used by the likes of Rudolf Clausius & Wilhelm Conrad Röntgen to explain light. Throughout the 1800's scientists clung to the notion of "luminiferous ether," an invisible, elastic fluid with light-transmitting properties.