A starter is an electric motor that gets the engine turning before it is able to do so on its own. The starter motor drives a gear which extends out to spin the ring gear teeth on the flywheel or flex plate, which is connected directly to the end of the crankshaft.
The starter's drive gear isn't always in contact with the flywheel/flex plate. If it were, it would be an extra load on the engine, make a lot of noise, and wear out the starter quickly (possibly within a minute). The gear component is drawn back into the starter after it is done starting the engine (usually it retracts after the key is allowed to turn away from the "start" position or the remote start is activated via a key fob).