Brush any dirt on the sprinkler head aside with your hand so you do not get dirt in the sprinkler assembly when you remove it. It is not necessary to disturb the grass around the sprinkler.
Unscrew the sprinkler cap by turning counterclockwise and pull up the sprinkler assembly. The sprinkler head holds the cap onto the rest of the assembly. Push the sprinkler cap down and unscrew the damaged sprinkler head.
Push down on the sprinkler cap and lower the new sprinkler head in place. Screw it completely clockwise to tighten it. Insert the sprinkler assembly back into place in the lawn and screw it in tightly.