Fungi First
Scientists agree that fungi colonized land well before plants did. As to when they colonized land is a difficult question to answer, as our approximations are based on fossil records and can only tell us when only some organisms existed—i.e. organisms with hard or solid body parts or spores, which many fungi are anything but. Regardless of when fungi colonized land, we know they added a component to soils that was not present in soils before: large amounts of carbon. This helped to not only break down the rocks on land, but also to help retain water on land, and consequently help pave the way for plants!
Lichen
One of the first and oldest interactions between plants and fungi is the symbiotic relationship known as a lichen. A lichen is formed from cells of algae and a filamentous fungus weaving together to form a unit that is different from either organism. Algae feed the fungus sugars, and the fungus helps to retain moisture and occasionally provide nutrients from either the substrate that they’re growing on or from dust in the air.
On the surface, this relationship seems symbiotic, which would mean both organisms can exist separately, but cooperation makes survival easier (kind of like cohabitating with roommates.) However, this is not the case for the lichen. Lichen does extend the range in which each organism can survive, but although the algae can exist and live freely, the fungus cannot. Whether or not the fungus was able to survive in the past by itself and has lost that ability is up for debate, but either way, the relationship has evolved to be either one of commensalism or parasitism. You know, clingy.
Endophytes
Other fungi in the soil that we know are relative to plants belong to three major groups: the Basidiomycetes, the Ascomycetes, and the Oomycetes. Most endophytic fungi—that is, fungi that live within a plant—are Ascomycetes, with some being Basidiomycetes. And the relationships of many endophytes to their plants are symbiotic. That means these are "friendly" fungi that help their host plant grow.
Fun fact: next time you uncork a bottle of your favorite red, consider that endophytes are also responsible in part for the flavor of most wine grapes, such as the Cabernet Sauvignon.