Soils are the fundament of terrestrial ecosystems. Across the globe, we find different soil types with different properties resulting from the interacting soil forming factors: parent material, climate, topography, organisms, and time. Here we present the role of soils in habitat formation and maintenance in natural systems and reflect on how humans have modified soils from a local to global scale. Soils host a tremendous diversity of life forms, most of them microscopic in size. We do not yet know all the functionalities of this diversity at the level of individual taxa or through their interactions. However, we do know that the interactions and feedbacks between soil life, plants, and soil chemistry and physics are essential for soil and habitat formation, maintenance, and restoration. Moreover, the couplings between soils and major cycles of carbon, nutrients, and water are essential for supporting the production of food, feed and fiber, drinking water, and greenhouse gas balances. Soils take thousands of years to form, yet are lost very quickly through a multitude of stressors. The current status of our soils globally is worrisome, yet with concerted action, we can bend the curve and create win-wins of soil and habitat conservation, regeneration, and sustainable development. This article is part of the themed issue ‘The role of soils in delivering Nature’s Contributions to People’.