Hundred Millions years ago, marine plants & animals die & settle to the bottom of the ocean floor. Sand and Silt settle on the top of the remains of the marine organisms. After a few millions years, many layers of sand & silt piles on the remains, causing high heat & pressure. Due to the lack of oxygen, there is partial decomposition of these remains which turn them into crude oil & natural gas.