The name "airbag" can be deceiving because the bag is not exactly filled with air. Instead, this life-saving device is filled with nitrogen gas, which is produced in a swift reaction by a compound known as sodium azide.
Sodium azide is a stable salt at ambient temperature. Under the circumstance of vehicle collisions, the trigger mechanism would heat up the powder, which leads to a sudden release a large amount of nitrogen within milliseconds. Based on the chemical equation 2 NaN3 --> 2 Na + 3 N2, a cup of the compound can easily produce enough nitrogen gas to fill a standard airbag, which is close to 70 liters.
But the other product of the reaction sodium is not a benign chemical. In fact, it is so reactive it can light up when in touch with water. Therefore, in the airbags retarding agents are mixed in with sodium azide to quench the potentially hazardous sodium. After all, no one wishes to be safe from a vehicle collision but get a chemical burn afterward.
Source: ACS Reactions via Youtube