A starter motor's primary function is to convert electrical energy from the battery into mechanical energy to crank an internal combustion engine, enabling it to start independently. It spins the engine's crankshaft to initiate the combustion process, replacing manual cranking, and automatically disengages once the engine runs.