I have a couple of books buried in a dark and sinister place known as my garage that would be able to give you exactly what you are looking for, but since the chances of me actually going to try to find them anytime soon are pretty slim, I’ll go with memory so don’t hold me to specifics.
The very short version is that when an explosive blows, an initial shock wave creates a very high pressure within the material, which creates very high heat causes nearly instant decomposition of the explosive. The decomposition creates and/or releases more individual chemicals/elements, which keep the shock wave, flame front and expanding pressure front moving, and releases big time energy. It is mainly the high heat involved in detonation which releases the toluene in TNT. Once released, it is largely, if not completely burned up. TNT and dynamite are, when talking about main explosives, actually on the lower end of the power scale but are extremely stable and safe to work with and TNT is easily castable. What makes an explosive powerful is the speed of detonation and the amount of heat and pressure formed. The higher the heat and pressure, the higher the brisance, or crushing energy. But there are always trade offs in terms of being too sensitive or insensitive which means booster chains being required to set it off, sometimes very intricate ones.
The main products of TNT detonation are similar to most other explosives. The largest by-product is Carbon, along with Carbon Monoxide, Carbon Dioxide, and small/trace amounts of Hydrogen Cyanide, Methane, Nitrogen, Hydrogen, and Nitrous Oxide, in addition to any original solids that may not have been consumed. I’m sure there are other trace elements but that’s all that come to mind.