There are sensors in the vehicle that detect large G forces.
They send a signal to a controller that fires the air bag.
In my Ford, there is a backup power supply that is supposed to store enough energy to fire the air bag if the battery cable gets cut in the first few microseconds of a collision.
That explains a lot! Thanks #12. However I am in need of greater details, viz. where from air comes to bags, are there any sort of pneumatic valves involved, may be a block diagram of the system. Did you say sensors? Ah I missed the post, it should have raised in electronic chat!