Natural gas is formed from dead animals and plants buried underground over millions of years. It exists in deep rock formations and is often found near oil fields. There are two mechanisms by which natural gas is created: biogenic natural gas forms from decaying organisms, while thermogenic natural gas forms from decayed organic material at high temperatures and pressures deep underground. Natural gas is a powerful fuel that is used for cooking, heating homes and buildings, and generating electricity via pipelines. When burned, natural gas is converted to carbon dioxide which contributes to global warming if levels in the atmosphere get too high.