This suzanne simard book talks a lot about "mycorrhizal" fungi quite a lot ie those that form a symbiotic relationship with a plant.
Typically the plant gives the mushroom the products of its photosynthesis ie sugars. And the mushroom gives thd plant access to water.
But the big that stuck out for me is that there's 2 types, one where the mushroom mycelia kinda latch onto the roots and thd exchange happens cos they're touching one another, they're sort of wrapped around one another.
But in another type, the fungus actually penetrates the root walls of the tree, and grows inside it like a parasite.