Turn off the water supply valve to the broken sprinkler. Tag or otherwise mark the valve to alert others of the work being done.
Dig an area around the broken sprinkler with a small hand shovel. You may have to dig 6 to 8 inches to get down to where the sprinkler is connected to the water supply pipe.
Disconnect the sprinkler from the water supply pipe by gripping the body of the sprinkler and turning it counterclockwise. Lock-jaw pliers will help if the sprinkler body is tight.
Install a pipe cap to the male end of the supply pipe. Apply pipe joint compound on the inner threads of the cap. Tighten clockwise with the lock-jaw pliers.
Restore the water supply to the system and check the cap for leaks.