Measuring the Air
How do fuel injection systems know how much gas to squirt anyway? Somewhere along the line, somebody (probably at Bosch) realized that you could measure how much gas your engine needed by how much air it was sucking in. Once your engine starts, the measuring of air begins. Early fuel injection systems used a vane system, which was basically a flap inside a tube, to measure how much air was being sucked.
Later systems use a "hot wire" to figure it out. When you turn your engine on, the wire becomes red hot. As air is sucked past this wire, it gets a little cooler. The car's brain measures exactly how much cooler it's getting and uses this number to figure out how much air it's sucking. Then it squirts the correct amount of fuel into the engine.
There are lots and lots of variations to fuel injection systems. We've got electrnic fuel injection, mechanical fuel injection, systems with one oxygen sensor, systems with four oxygen sensors ... but the basics remain the same.