My 1999 toyota corolla starter

the starter keeps spinning . without the key in the ignition. when i connect the neg battery terminal , the starter starts cranking the engine but iit wont stop. why?

Stuck solenoid. The solenoid is built into the starter case, and sends electricity to the starter motor when the key is turned. If the starter motor is running without the key in the car, the starter must be replaced. You could rebuild just the solenoid, but it is easier to replace the whole starter, which will include a new solenoid.