Like what happens when you first turn the key and start it up? If it makes a difference I'm talking about a L4 engine.
What's the play by play. How do the pistons, valves and crankshaft get moving?
Motor Vehicle Maintenance & Repair Stack Exchange is a question and answer site for mechanics and DIY enthusiast owners of cars, trucks, and motorcycles. It only takes a minute to sign up.Sign up to join this community
This is a pretty neat video showing all the working of the engine itself.
To give the simple, broad, answer to your question, the starter forces the crankshaft (the shaft at the bottom of the block attached to the Pistons) to start rotation. There are some actions which precede this, but they will change a little for every make/model/year, or as the power plant configuration evolves. The basics however are that it enables the ignition system as well. On newer cars a lot of the ignition, timing, intake, injection and stuff is handled by the cars computer, but on older vehicles it was a bit simpler. But it's still basically the same. Turning the key enables various circuits to activate/deactivate various relays which will allow the ignition process (that of the spark plugs) to happen. The starter can force the motor to turn, but if the ignition is not enabled, you won't get combustion (at least with standard gas motors).
Unlike diesel engineer, gas engines need a spark for combustion to occur and for the semi-self perpetuating process to start. Turning the key off will (amongst other actions) cut the ignition circuits and stop further ignition from occurring. This is where the winding down comes in.
Anyway, there are a lot of cool and informative videos on YouTube which you can see via the above link.