Here’s an old video of water being poured on burning paraffin wax.
Paraffin wax is the wax used to make those cheap tea light candles you see at drug stores (the short, fat kind that sit in little aluminum holders). Tea lights are different from standard candles in that the entire body of the candle melts, and the wick simply serves to suck the liquid fuel up towards the fire until there is none left.
A huge advantage of this design is that there is no messy leftover wax—the wax itself is burnt as part of the candle. The reason for this is that paraffin is more chemically similar to gasoline than ordinary candle wax. Paraffin, in general, is what’s known as a saturated hydrocarbon. This essentially means that the molecules that comprise it consist of chains of conjoined carbon atoms with a huge amount of hydrogens bonded to the chain along the side. Carbon atoms like to form four bonds apiece, and so, as one can easily visualize, a given carbon in the middle of a chain will have two bonds to neighboring carbons, and two open bonds to which hydrogen atoms can attach. Carbon atoms on either end of the chain have three open bonds(because there is no “next” carbon in the chain), leaving there three sites to which hydrogen can attach.
Unlike hydrogen, however, carbon can actually form more than one bond to the same neighboring atom. In a hydrocarbon(again, a molecule consisting of just hydrogen and carbon), the carbons have the option of forming multiple bonds to each other rather than just one. For example, if a carbon bonds to a neighboring carbon in the chain twice, and then each member of the doubly bonded pair bonds once to another carbon in the chain, then each of the original carbons only has one open bonding site left for hydrogen to attach to. As you can imagine, there is a great number of different possible combinations of single, double, and even triple bonded chains of carbon atoms(with any carbon atom with fewer than four bonds to other members of the chain having the difference made up by hydrogen attachments). The ability of carbon to form a great number of similarly structured(yet chemically and qualitatively distinct) compounds is the basis of the field of organic chemistry.
Our paraffin wax belongs to a very special case of carbon compounds, however, known as alkanes. Alkanes have the maximum number of hydrogens per molecule, which a little intuition will tell you means that all carbons in the molecule are single-bonded to one another. In fact, if we recall that each of our singly-bonded carbons bonded to two neighbors(leaving two of its allotted 4 sites open to hydrogen atoms), and if we remember that the endcap carbons of our chain had three open slots for hydrogen, then it should be clear that the number of hydrogens in an alkane molecule with n carbon atoms is 2n + 2.
Many well-known fuels satisfy this property. For example, propane, a common gas for outdoor grills, has the molecular formula C3H8. In general, alkanes make excellent fuels because there is a lot of energy stored within their single bonds that can be released through burning:
Formally known as combustion, burning is the situation in which we cash in all the energy stored in these single bonds in order to get heat. Technically, we start with any hydrocarbon and oxygen, and after adding heat we get water and carbon dioxide as output molecules. The latter set of molecules has much weaker bonds than the original hydrocarbon, and so the bonds have less energy. The difference in energy is manifested in all the heat released when we burn hydrocarbons. However, among the various bonds in the hydrocarbon, the most energetic are those between carbon and hydrogen(rather than between two carbons), and so there is a definite advantage to burning fuels with a lot of hydrogen bonds(hence an alkane fuel would be preferable to one that contains double carbon bonds). This is why alkanes are referred to as “saturated”– they have as much hydrogen as will fit onto a chain of carbons, which also means that they will release the most energy when burnt of all possible carbon compounds with that many carbons. This use of “saturated” is the same as that you see on food labels as “saturated fats”– sat fats contain the most energy per mass that gets stored in your body as fat.
Our paraffin wax is an alkane hydrocarbon with something like 40 carbons, meaning that there is a lot of energy available to burn. But unlike smaller molecules, like propane, the awkwardly-big wax molecules very slightly attract each other(see ), causing the wax molecules to clump together into a solid instead of a looser gas at room temperature. Thus even though we may expect paraffin wax to burn more vigorously than, say, propane, we actually find that ridiculously long carbon chains run into structural problems that diminish their usefulness as fuels.
But when paraffin wax is allowed to boil, the fumes it gives off are still flammable hydrocarbons, but in a much more spry gaseous form. These fumes burn very fast, creating enough heat to cause the wax to continue to boil. If the process were allowed to continue indefinitely(as occurs in a standard tea light, albeit at a much lower temperature due to the catalyzing effect of the wick), then the container would just burn through all the wax.
But when water is thrown it, it flash boils because its boiling point is so much below that of the wax. The rapid gaseous expansion of the steam causes it to throw tiny amounts of molten wax everywhere, freeing the molecules from sticking together and slowing things down and instead creating a simulation of propane, which burns very quickly because its molecules are so free to move about. The resulting fireball is qualitatively similar to a gasoline or propane explosion.
N.B: An equivalent argument is that the water, by throwing the wax everywhere, rapidly increases its surface area and allows it to burn more easily. This is the same principle behind why it is easier to burn paper than logs of wood, despite their similar composition. Under this logic, a valid model of the fireball would be that of the suspended particulate explosion.