Once the engine in your car is started, as long as it receives air, fuel, and spark it will effectively run indefinitely without any assistance. This is why generators and irrigation pumps can be used in remote areas without an engineer tending them constantly. There has even been talk of using internal combustion on satellites and space craft to provide heat and generate electricity (obviously, they would need to bring an oxygen supply with them).
But the engine needs to be started in the first place, which is where the starter motor comes into play! Can you imagine what life would be like if we still hand cranked our cars?
To turn the engine you need an electric motor that can provide lots of torque for a brief period of time, on demand, over and over again. That is exactly what the starter motor is, plus a mechanism to allow it to engage and disengage mechanically in an instant.
Charles Kettering invented the electric starting in 1911 for use on the 1912 Cadillacs, integrating an electric motor, generator, and spark ignition system, vastly modernizing cars of the time. Vincent Bendix engineered a drive system that allowed the starter gears to engage or disengage quickly and effectively, which is an important part of the starting system. The generating and ignition functions would soon be divorced from the starter and get their own dedicated systems, but ironically, many modern mild hybrids use an integrated alternator/starter system once again. The pinion gear then turns the flywheel and the engine starts. As soon as the engine starts (and you let go of the ignition key) the solenoid allows the pinion gear to retract and disengage from the flywheel, preventing damage to the starter.
But how does the starter motor work? It's actually relatively simple - as you turn the key switch, power is sent to the ignition system to fire the spark plugs, and to a larger magnetic switch, which sends a rush of power direct from the battery to the starter.
That magnetic switch is called the solenoid, and is typically bolted to the starter itself, both switching high amperage power and causing the gears to mesh. When the electromagnet is engaged, the solenoid plunger connects the thick battery cable to windings within the starter to actually turn the electric motor, plus it pushes a rod, engaging a fork which in turn pushes a pinion gear (connected to the motor) to automatically engage with the flywheel.
The starter demands a huge amount of power, more than any other component on your car, which is why the first symptom of a low battery is difficult starting. If you turn the key and only hear "click, click, click, click" chances are the battery does not have enough power to turn the starter, but the solenoid is doing its job. The starter pictured above is likely from a diesel car or truck, with the ability to crank under 24v power to overcome the greater compression ration of a diesel engine.
It can take a bit of troubleshooting to determine if you are having starter problems or battery problems (or battery cable problems), but you certainly want to replace the right part to avoid wasting time and money. Because of this, making sure the battery is fully charged and all the wire connections are clean and tight is the first step if you have a car that won't crank, or cranks slowly.
There are several ways a starter can fail, but rarely does it happen all at once. If the internal mechanical parts of the starter (the bearings for instance) start to go bad it will take more power to turn it, until eventually it does not turn fast enough to start the engine. If the insulation on the armature winding start to break down, the started will not have as much torque as it once did and may not want to turn the engine over, even with a fully charged battery. If the starter just clicks but doesn't turn, and the battery is fully charged, chances are the connections withing the solenoid or commutator are worn or dirty and not conducting electricity as well as they should. Some times a starter will work fine in the morning, but not crank once it has gotten warm from driving.
The good news is, once you have the starter off the car, most auto parts stores can test it while you wait and confirm if it is bad or going bad.