Well, that is a loaded question.
There is a somewhat simple answer and it may help you understand the basics of most automobiles made since the late 1980’s.
As most of us know, an internal combustion engine needs three things to run. Air, fuel and spark. Prior to the days of computers, fuel was provided via a mechanical (or sometimes electric) fuel pump to a carburetor. The natural vacuum (technical term is manifold pressure) would draw the fuel into the engine via Bernoulli’s principle. The air fuel mixture would be compressed in the cylinder and ignited by the spark plug. You probably know the rest of the story. If not look here.
The main difference between the old technology and the new is the delivery of the fuel to the engine. Of course the spark delivery has changed to some degree, but we still have spark plugs. The fuel is supplied by an electric pump and pressurizes the fuel system. Electronic injectors meter the fuel into the engine where it is mixed with the air and drawn into the combustion chamber. Ironically, the basic engine is virtually identical to one from 100 years ago, with obvious refinements which we can get into later.
In order for the computer to know how much fuel to give the engine, there are a variety of sensors. Without going into a lot of detail, most computers send out a 5 volt signal to the various sensors and depending on what voltage is returned to the computer it can determine what its various outputs (timing, spark, fuel and of course emission control) should be.
Anyone can afford one of these inexpensive code readers, but you’ll need a scan tool to determine exactly what is going on with your car and even with that you need information and the skill to decipher it. That’s why the shops are charging $100 plus per hour to work on your car. However with an inexpensive code reader and some Google skills, you can probably fix a lot of your own problems if you’re mechanically inclined. I’ve found throughout my career most driveability problems are simple things like spark plugs and spark plug wires. A misfire (p030x codes) are almost always secondary ignition problems that are easily repaired by even the least skilled Backyard Bob.