Answer: Moss grows in conditions that are not favorable for lawn grass such as shade, compacted soil, infertile soil, overly acidic soil, poorly drained soil, mowing the lawn too short, and/or a combination. Removing the moss will not solve the problem. Instead, you need to correct the conditions.
You should begin by running some basic soil tests to check fertility and pH. Then fertilize and lime as indicated by the test results. Compaction can be countered by core aeration followed by a top dressing of good quality compost. Poor drainage can sometimes be corrected by adjusting the overall drainage pattern for the site, such as redirecting gutters and swales. Shade can sometimes be countered by thinning nearby trees. If the area is truly shady, you might consider using a shade tolerant groundcover instead. The following web page offers more details.
I hope this helps you trouble shoot.
Q&A Library Searching Tips