Moss can be prevented by regular checking and correcting the soil pH with applications of lime. Over time all soils gradually become more acidic. As it does, grass, which likes pH neutral (7.0) starts to die off. Moss like acidic soil and thrives, gradually choking out the struggling grass. Moss makes the soil even more acidic as it grows.
To reclaim the area, you’ll now need to kill the moss with a moss killer. Then you’ll need to do a pH test to determine home much lime needs to be applied to make the area suitable for grass to grow and then reseed the area. Once the pH has been brought back to neutral (7.0) it should be checked every 3 to 5 years to see if another application of lime is needed. Here’s a link to walk you through pH testing and starting a lawn from seed. https://blog.timesunion.com/gardening/starting-a-lawn-from-seed-its-time-to-get-crackin-2/7452/