Some chemists (I only know them by the nom de internets chemistnde and hecticgorilla) posted this on reddit with a title about livening up a slow lab day. (Good part starts at 0:39)
This is a great example of "explosive decomposition," a term that most chemists have seen on warning labels and MSDS's but not in real life. The reactant 4-nitroaniline sublimes before it gets to the reaction temperature, so that's the yellow gas you see.
The reaction is really simple, it's just sulfuric acid reducing an organic molecule to form mostly carbon. This video (which is the same reaction with less awesome music) gives a better view of the solid foam produced. NASA actually investigated this reaction in the 1970's as a possible way to put out fires.
This is a reasonably safe decomposition for people with appropriate training to do. If you don't know what para-nitroaniline is or have access to a fume hood, you should in no way shape or form consider it.