Soil is composed of decayed material and minerals and is studied by geologists. It contains crystals and is made up of topsoil, subsoil, and bedrock layers, with bedrock formed from cooled magma underneath the earth's crust. Certain geological formations can contain valuable gems.