An airbag system has three components: the bag, the sensor, and the inflation system.
The Bag
Airbags are made from a fine gauge of nylon and it is folded into the steering wheel, dashboard and the door panel. Sometimes, airbags are folded in the roof rails above the door too.
The Sensor
This tells the bag when to inflate. It usually requires a force equivalent to running into a brick wall at 10 - 15 mph. In contemporary airbags, sensors determine whether a person is in the front passenger seat. Sensors may also see whether the passenger has enough mass so that the bag is safely deployed.
The Inflation System
The inflation system is made of potassium nitrate (KNO3) and sodium azide (NaN3). The gas inflates the bag at about 200 mph. The gas is removed through tiny holes in the airbag to deflate. The whole process takes nearly 1/25 of a second.