What is natural gas?
Natural gas is - as the word says - gas that occurs naturally.
When organic material decomposes in the absence of air, this gas is formed, mainly in the form of methane
If the organic material got trapped millions of years ago, and the gas cannot escape because there is a gas-tight layer above it, it stays underground, and tends to collect in the higher places under the gas-tight layer (so-called gas-domes, or more popularly: gas bubbles).
These can be mined.
After pumping up the gas, it still has to be cleaned from impurities, and then it can be used for heating.
BTW: something similar creates oil, and often (but not allways) they occur together in the same region.