The chemical element of diamond is very simple, it is ordinary carbon, same as charcoal, but the formation of the diamond requires a very demanding condition.
Diamonds were formed in the carbon layer which is about 150-200 km distance away from the surface of the earth
Most diamonds were formed at 3.3 billion years and 12-1.7 billion years ago. Even the most newly formed diamonds came into being at hundreds of millions of years ago, it is important for the earth's crust to keep still for hundreds of millions of years of time.
Diamonds were formed in an anaerobic conditions which is about more than 1500 degrees Celsius, and under about 5 Gpa pressure (which is about 4000 people standing on your feet).