What is the science behind natural gas?

Natural gas seems to be the result of biological matter that decomposes. Plants especially. It could also be the resulting emanations of petroleum as it decomposes further from it's oily state to a gaseous form notisable in the presence of Propane, Ethane and Methane.