The basics are:
The down stroke of the piston sucks air into the combustion chambers (this is what causes the vacuum)
The Throttle Valve in the Throttle body acts as a gate that controls how much air is allowed to enter the combustion chamber.. the "gate keeper" is your foot
Your car needs a correct mixture of air to fuel (basic chemical reaction theory from high school).... so The EFI system has to add the correct amount of fuel based on how much air is sucked into the combustion chamber
So to measure how much air is sucked in, a device is needed. In our cars, it is called the AFM and is simply a flap. The more air that is sucked passed the flap causes it to move more. This movement is converted to a voltage and is sent to the ECU Brain and says "Pssttt hey buddy, a heck of a lot of air is flowing by me so do yer thing now!!!"
The ECU reads the AFM and adds the correct amount of fuel to maintain the correct air to fuel mixture.
The ECU controls the amount of fuel by telling the injectors how long to squirt. A short squirt means little fuel, a long squirt means lots of fuel... at idle it is a short squirt at "floor it" the squirt is long. (The time duration of the squirt is called the injector pulse time or sometimes "duty cycle"
Well that's it in a nutshell everything else is just excess!!
Since the above is too simple to be true, I'll go over the extras:
The Temp sensor in the AFM measures how cold the air is. Cold air is denser and has more oxygen packed in. Since the Air to fuel mixture is actually oxygen to fuel mixture, the ECU needs to know about the extra oxygen. So the Temp sensor in the AFM tells the ECU (Darn that air is cold) And the ECU instantly thinks (Damn, I better add more fuel to burn that extra oxygen!) btw adding more fuel means increasing the injector's squirt duration.
The Water Temp sensor in the thermostat housing tells the ecu how cold the engine is. The Ecu adds more fuel when the engine is cold just because the engine works better with extra fuel when it is cold. As the engine warms up, the ECU cuts back on this extra fuel but still adds the basic amount determined by the AFM and AFM temp sensor
Cold Start Valve is a 7th injector. It add's more fuel when the engine is "damn cold" and only when the starter is turning. The ECU senses when the starter is turning and when the temp is cold then it fires the CSV. Since the CSV is near the TB, it's fuel gets distributed to all 6 combustion chambers.
The Thermotime switch is connected in series with the CSV. It is a temperature controlled switch. It also has a built in heater that brings it up to the shut-off temp. When the engine is hot, the Thermotime switch opens and prevents the CSV from adding extra fuel. If you crank the car too long when it is cold, the heater warms up and causes the CSV to stop adding extra fuel... this prevents flooding.
The Aux Air Regulator AAR is a device that lets air flow past the TB valve when your foot is off the pedal and the engine is cold. It causes a fast idle when the engine is cold to prevent stalling. You could emulate it by slightly pressing the pedal when your cold car is first started but I am sure you have better things to do like scraping the ice off the windows.
The Fuel Pump simply delivers fuel. It actually sends too much fuel thus there is a return line back to the tank.
The Fuel pressure regulator opens and closes the return path to the tank to maintain a constant fuel pressure. Since the ECU can only control the amount of fuel via the squirt duration of the injector pulse, too much fuel pressure will cause too much fuel to be squirt and too little fuel pressure will result in too little fuel squirting... think about the time you turned a faucet at a friends place and got blasted because their water pressure was too high... fuel pressure has the same effect in an EFI system.. if it is too high from a clogged return line or too low from a clogged filter, send line, injector or flaky pump then the wrong amount will be squirt regardless of how correct the the injector's pulse duration is.
The TPS is just a switch connected to the TB Valve. It senses when you got the gas pedal tramped (Wide Open Throttle WOT) or when your foot is off the pedal (Idle). The ECU adds more fuel when the TBS says "Go like hell". This extra rich mixture give you more power. The ECU also adds more fuel when your foot is off the gas to make a smoother idle. The TPS also does a fuel cut mode to save gas... if you are going over 3200rpm and take your foot off the gas, the TPS sends an Idle signal and the ECU says "Damn I 'm gonna turn off the fuel if he just lifted his foot off the gas at this speed!... must be the fuzz".... but when the RPM's drop to 2800rpm, it turns the fuel back on.... "must of passed them by now". Note that if the TPS switch's idle gets shorted with water, the ECU will always think your foot is off the pedal and go into fuel cut mode. This results in the RPM's brick-walling at ~3000rpm. (This is a common problem after washing a 280z!)