Moss only grows in the lawn when shade, low fertility or poorly drained soil are present. The moss does not kill the grass, the underlying growing conditions are so unfavorable that the grass simply dies out.
Providing adequate sunlite and drainage can be both difficul and expensive. Low fertility, on the other hand, can be corrected by using a well balanced lawn fertilizer.
Moss can be killed by spraying with copper sulfate or iron sulfate mixed 2 to 5 ounces to 4 gallons of water and applied at a ratio of 1 gallen per 250 square feet. Killing the moss without correcting the conditions that favor its growth will not prevent a reoccurrence of the problem.
Where shade is quite heavy it may be easier to plant a shade adapted ground cover rather than try to grow grass.