During the Cambrian period, about 540 million years ago, some early plants evolved from earlier algae that could live on land, outside of the water. These plants were like modern moss. All of the animals were still living in the water, so on land there was only moss and mushrooms.
Because moss was just beginning to get used to being out of the water, it still needed a lot of water nearby, and it could only grow in very wet places, like right next to streams, or where it rained a lot. There wasn’t much dirt yet on the land, because there were no plants to decay and turn into soil, or to break up the rocks with their roots, or to hold back the crumbled rock from falling into the ocean. So moss has very shallow roots, just enough to hold on to the bare rock it lives on. (If you try pulling up some moss from the lawn you will see that it is very easy because of the shallow roots.) Moss gets most of its food from the water washing over it, instead of through its roots.
Like other plants, moss plants make their own food by photosynthesis. All of the cells in a moss plant can photosynthesize, thanks to their chloroplasts, so moss plants don’t need a circulatory or vascular system.
To grow bigger, moss plants make new cells through mitosis. But when they want to reproduce, moss plants use meiosis to produce spores, which blow away in the wind. For more than a hundred million years, moss and mushrooms had the land to themselves. But then, about 400 million years ago, these early mosses evolved into the earliest ferns.
Today moss and mushrooms are still successful in places that are damp and shady, like valleys with streams running through them.