Answer:
If you are refering to an air bag in an automobile, then those bags are filled, very quickly, from a pyrotechnic device called a gas generator mounted at the base of the bag.
Small sensors mounted in the car sense when you hit something hard and they ignite the pyrotechnic charge, which burns rapidly, releasing a lot of gas into a bag on the steering wheel, dashboard on headliner of a car. The bag fills and then deflates very very fast. FAST is the key thing here.