Moss grows in the lawn when shade, low fertility or poorly drained soil are present. The moss does not kill the grass, the growing conditions are so unfavorable to the grass it dies out. Moss will grow on acid soil but this is not the main reason it will grow in a particular area. Do not add lime to try to control a moss problem unless a soil test indicates a need for lime.
Shade and poor drainage can only be corrected with some difficulty. Low fertility can be corrected by using a lawn fertilizer.
Moss can be killed by spraying with copper sulfate or iron sulfate at the rate to 2 to 5 ounces in 4 gallons of water. The 4 gallons is sufficient to cover 1000 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.