There are about 10,000 species of mosses which used to be classified with the Liverworts and Hornworts, but the latter are now in a their own divisions. They are bryophytes which means they do not have a vascular system, having leaves and stems but no roots; attachment to the substrate is by fine colourless or brown hairs called rhizoids. Often the leaves are only one cell thick.
Moss is ever-present as the spores float around in the air, invading the grass sward when the fertility is low and the soil is wet.
Sphagnum moss has very good absorption qualities when dried, and has been used to make nappies, sanitary towels and wound dressings. During the World Wars many tons were shipped to the front after being compressed into cakes, sometimes using the same machinery that made the munitions. It has mild antiseptic properties and these were boosted with garlic juices. There is some evidence that use as a wound dressing may go as far back as the Bronze age.
Keep the lawn well fed and don't cut it too short, especially when the growth rate is slow in the winter. Improve the drainage by pricking or spiking. Brushing coarse sand over the surface after spiking helps to keep the new pores open. Scarifying can help to spread the moss if it is growing actively, so it might be best to kill it first. This is done with a chemical treatment like Dichlorophen, a weed-and-feed treatment or Lawn Sand. The latter contains Ferrous Sulphate which can be obtained form hardware shops in powder form and is watered on at a rate of 6g per m². (Make up the mixture on a tray or plastic sheet as any spills will leave a rusty stain on paving).
On flowerbeds a good time to remove it is after a frost which will have lifted it and most species are easily gathered from the surface. However, the moss shown in the lower picture on the right, which resembles a miniture fir tree, has a relatively deep rhizoid which has a tenacious grip so is more difficult to remove and usually brings a clump of soil with it. It can be killed with a weedkiller such as Glyphosate first.
On hard landscaping moss can be prevented by regular cleaning. Usually first to develop is a layer of algae, so if this is treated the moss will not arrive. Use one of the many products such as Jayes Fluid or a cheaper option, bleach - widely available in bulk under the name Hypochlorite, a 10% solution which can be diluted 1:4 and applied as a spray or with a watering can fitted with a dribble bar.