 Large deposits of fossil fuels are obtained from Earth 's crust , consisting of coal , petroleum , and natural gas . These deposits are used by humans both for energy production and as feedstock for chemical production . Mineral ore bodies have also been formed within the crust through a process of ore genesis , resulting from actions of magmatism , erosion and plate tectonics . These bodies form concentrated sources for many metals and other useful elements . 
