Pyrotechnics

Can someone explain the engineering behind this

Can someone explain the engineering behind this