Its primary function is as the actuating coil of a contactor (a relay designed for large electric currents) which connects the battery to the starter motor proper.
When the ignition switch is turned on, a small electric current is sent through the starter solenoid.
When the solenoid is energized, it operates a plunger or lever which forces the pinion into mesh with the ring gear.
The pinion incorporates a one way clutch so that when the engine starts and runs it will not attempt to drive the starter motor at excessive RPM.
[2] If a starter solenoid receives insufficient power from the battery, it will fail to start the motor, and may produce a rapid clicking sound.