When water pressure forces the inner supply tube up and out of the ground, small bits of dirt can become lodged between that tube and the inside wall of the sprinkler. Over time, that can lead to scratches on the plastic tube. When the scratches build up, they can cause friction between the two pieces of plastic and stop the rotation of the sprinkler head. When this happens, you must replace the entire unit.
The inside of a rotating sprinkler contains small gears that move the sprinkler. These gears rely on water to lubricate them and turn the sprinkler back and forth. It's possible that the gears can become worn down over time, causing the sprinkler head to stick or rotate very slowly. Most gear-driven sprinklers cannot be repaired, so the only option is to replace the entire unit.
Rotating sprinklers rely on constant, steady water pressure to operate properly. When there is new construction nearby, or the city is testing the water, your water pressure can dip substantially and the rotating mechanism will not work. If you suspect low water pressure, contact your water provider and ask if it is a temporary problem and when the water pressure is expected to return to normal.
It's not uncommon to run over a sprinkler head accidentally with a lawnmower or vehicle. When this happens, it can crush the top of the sprinkler. A damaged sprinkler head will not rotate properly. This damage can also crush the nozzle or crack the body of the sprinkler. A crushed or damaged sprinkler must be replaced with a new unit. Some sprinklers are available with metal tops, which can help reduce the damage from accidents.