Healthy topsoil has both inorganic (mineral nutrients) and organic components, and a texture that enables plants to grow well. It provides good anchorage for roots, air spaces where roots can obtain oxygen, holds enough water adequate for plant growth, and has all the minerals plants needs in the form that they can take up. It also contains macro and micro-organisms that make the nutrients available to the plants at the correct rate.
The pH of the soil is important. It is a measure of how acid or alkaline a soil is, and is measured in pH units. Soil is neutral at pH7, more acid from below 7 to 0, and more alkaline from above 7 to 14. Most crops grow best in soil with a pH between 5.5 and 7.0, though some plants require more acid or alkaline conditions.
By enabling healthy growth, soil helps protect plants from insect pests and pathogens. This may be because the micro-organisms in the soil prevent their build-up. For instance, healthy soil contains fungal mycorrhiza that contact the roots and greatly extend the area for the plant to take up minerals and water.
Healthy soil also provides plants with endophytes - bacteria, algae and fungi that live inside the plants cells. They have many functions including supplying nutrients, protection from pests and pathogens and, importantly, increasing plants’ ability to withstand stresses, such as drought and salinity.
Endophytic fungi growing inside roots increase contact between plants and the fungi and enable good transfer of nutrients between them.
Bacteria on the roots can also supply nutrients and protect them from harmful pathogens. Nitrogen-fixing bacteria present in leguminous plants are well known to do this.
Note, pesticides destroy these essential soil micro-organisms.