A combination of exhaust and indeed the computer.

When you are at high RPM, the engine is sucking in air and the computer is dumping fuel in to compensate. When you lift the throttle, the air supply is reduced, but for that moment before the computer can dial back the injectors, it's dumping with no air to combust with, so it passes right through and into the exhaust. Some cars are tuned to run more aggressively, i.e. you'll see less flames, as the mixture is too lean, and some more conservatively, flames, black smoke out the tailpipes and soot all over the back of the car. So if you run the RPMs in the mid range causing the manifold to get hot enough to ignite this unburnt fuel and then stab the throttle, you might get flames.

Please don't try it like this guy
https://youtu.be/mtyrzo3J_XU