How are diamonds formed
We could summarize by saying that diamonds are formed thanks to carbon deposits of billions of years ago that were about 150 km deep in the earth's mantle, subjected to about 1,100 degrees Celsius and at a pressure between 45 and 60 kilobars.
fuente
Let's explain all this much better to understand it.
Diamonds come from the formation of pure carbon deposits millions and millions of years ago in the bowels of our planet with a very high pressure and heat.
The temperature that carbon needed to be a diamond candidate was between 900 and 1300 degrees Celsius and a pressure of 45 to 60 kilobars.
With the passage of time and thanks to the lava of the volcanoes, these deposits of pure carbon were gradually expelled from the interior of the Earth towards the outside forming carbon mines from where we extract it.