Mosses are just the simplest of plants and they will grow just about anywhere that higher plant forms cannot survive. Moss growing in a lawn area generally (except in Pacific NW and some places in Canada) means that the area is inhospitable to the growth of the turfgrass previously planted. Mosses are very weak competitors to turf. Healthy turf will outgrow and eradicate moss when it is treated properly in our area.
Your main job is to find the problem with the environment or the growing medium - the soil - if any, and make the site more hospitable to turf. Also pick the right turf for the site. The moss is just a symptom - it is not your main problem. If your soil is already alkaline, adding lime will just weaken the existing grass more, and allow more moss and weeds. Need to soil test before applying lime.
There are products that control moss. Since it is a plant, Roundup even knocks it out. Do a search on moss and you'll get tons of comments.