How do I fix a broken nipple under my sprinkler head?
A picture would make it easier to help, but I would guess the white "nut" you see is probably the PVC female adapter that is glued to the pipe. 



If you can do it, the fastest fix is to unthread the nipple from inside the hub, then just replace it with a new nipple.

If you can't do that, you'll have to cut the adapter off, and then glue a new one on (PVC glue is permanent -- once it sets, it's never coming apart). If there is enough room you can just glue a new adapter on, and then get a slightly longer nipple to keep the sprinkler head at the same height. 

If there's not enough room, you may need to dig it up some more, cut the elbow or T below off, and replace everything.