Depends on your definition of soil. The Earth's topsoil or the first horizon of the ground outdoors (where most plants and organisms live), varies drastically depending on location. It is essentially a mixture of weathered rock\minerals and mostly decayed organic matter (humus). The ideal soil is referred to as loam, which is roughly equal parts sand, silt and clay (about 20% clay, and humus). The components vary in particle size; with clay\humus particles being the finest (microscopic) and magnitudes smaller comparatively than silt or sand particles (the largest).
Clay and humus particles have a certain characteristic, in particular due to their chemical and physical attributes they possess a net negative charge. This causes the particles to attract and hold onto cations: the positively charged (ionic) nutrients which plant roots assimilate (NH4+, K+, Ca++, Mg++, etc). This is called cation exchange capacity and it is basically a measure of how well a medium will retain nutrients. Soils with high clay and humus have high CEC and these retain nutrients very well. Humus also holds moisture. However, as you may be aware, clay being the very fine-particle and densely packed material that it is, it is also heavy and too much seriously hinders aeration and drainage.
When you buy bagged potting soil for indoor container gardening, it is actually quite different than topsoil\loam and many potting soils do not actually contain any loam or "soil" at all. Virtually all are soil-less mixes to some degree. An exception to this is Fox Farm Ocean Forest, which has sandy loam. OF and many others are sphagnum-peat based (there are various grades of sphagnum), and they might contain compost, forest humus, or earthworm castings (all forms of humus), and perlite or pumice (a few, vermiculite) along with a liming agent such as dolomite lime (or oyster shell flour) and any other fertilizers if any. The liming agent provides calcium and potentially magnesium as well, and it neutralizes acidity which is important because sphagnum can have a pH as low as 4.
Coco coir is relatively new to horticulture, it has really taken off over the past couple decades as a plant growth medium or soil amendment. It also comes in different varieties but can have a CEC comparable to sphagnum, along with better pH and high porosity (stays aerated when wet). My preference is the loose pre-rinsed "high pith" coco coir such as Botanicare CocoGro.