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 gear teeth on the flywheel, which is connected (either directly or indirectly) to the crankshaft.
The starter's drive gear isn't always in contact with the flywheel. 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 couple of seconds). 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).