The plants and animals that died hundreds of millions of years ago underwent decomposition. The decomposed matter along with sand and silt in an oxygen free environment formed fossils like coal,oil and natural gas. The lightest hydrocarbons are in the form of gas. The main composition of natural gas are methane( this contains one carbon atom and four hydrogen atoms), carbon dioxide and water vapor.