When plants photosynthesise, they combine carbon dioxide from the atmosphere and sunlight energy to produce simple sugars and carbohydrates. They use these sugars and carbohydrates to grow, build their own tissues and produce things that humans harvest, like starches.
But sugars and carbohydrates are not the only nutrients that plants need to survive and thrive. They require a wide array of micro and macro nutrients including nitrogen, phosphorus, potassium, iron and sodium. Fortunately for plants, there's a rich source of these nutrients right beneath their roots in soil parent material (rocks, pebbles, sand, silt and clay) and organic matter.
On a molecular level, the parent material comprises crystalline structures that contain atoms of minerals. However, the minerals are not available to the plant while they're bound up in these structures. In order for plants to be able to utilise nutrients from the parent material and organic matter, the soil food web must be in balance and a process called nutrient cycling must take place.
When plants need these nutrients, they 'invest' some of the simple sugars and carbohydrates they produce during photosynthesis into the soil through their roots. These root 'exudates' attract and feed two important microorganisms, bacteria and fungi, which then rapidly grow and reproduce at the root zone. This is an example of carbon sequestration, as CO2 is taken from the atmosphere and delivered into the soil, where bacteria and fungi use this food source to reproduce, building their bodies predominantly from carbon.
At the root zone, the growing population of bacteria and fungi, or 'decomposers', release enzymes that break down the crystalline structures of the parent material, releasing the nutrients bound up within. They essentially mine and consume these nutrients from the parent material as well as from decomposing organic matter.
The next step of nutrient cycling is where 'predator' microorganisms come in. Protozoa and nematodes are attracted to the root zone and consume the bacteria and fungi (and the nutrients within them). The waste left behind by these predator microorganisms contains an abundance of these minerals and nutrients in plant-available form, which are easily absorbed into the plant roots.
Thus, the plant gets a return on its investment of simple sugars and carbohydrates, in the form of essential macro and micronutrients. In other words, plants will give up some of their precious resources because, through these symbiotic relationships, they later gain nutrition. It is a cooperative and collaborative community and without a healthy and balanced soil food web, this nutrient cycling isn't possible and plant health suffers as a result.