Provide model number so I can answer your question correctly, Agitaters do not spin, only inner tubs. Agitators wash back and forth. Sometimes the agitator dogs inside the agitator wear out and the clothes mover ( Top Agitator Part) will not move. If your unit fails to spin out you might have a faulty lid switch. If the inner tub fails to spin on the spin cycle it could be something else.
The model # XXXXX XXXXX Sorry the confusion. the agitator will not move, but it makes a noise like gears are turning. I took off the top cover of the agitator and the dog ears look fine (not slipping) I have replaced the dog ears in the past.
It sounds like you have a bad transmission. There is a clutch and spin tube,but the transmission is probably bad. Its only about $150.00 and is one of the easiest transmissions to replace,( From the bottom) . If you replace it yourself, make sure you remove the weep hole seal(on top of the gearcase). Remove the agitator bolt, and and three screws hollding the trans in (Bottom). Cakewalk for a gearhead. Good luck.