`CH_4 + 2O_2 -> CO_2 + 2H_2O`
This is an example of a combustion reaction. When a hydrocarbon combusts it reacts with atmospheric oxygen to produce water and carbon dioxide. Methane, having just one carbon, is the simplest hydrocarbon.
When balancing a combustion equation, balance the O2 last because multiplying it by a coefficient doesn't change the amount of anything else.
Some combustion equations are hard to balance because there's an odd number of oxygen atoms on the right side but the left side has O2, which is always going to be even. You can see that this is going to happen if the coefficient on water is an odd number. If this happens, doubling all of the coefficients will resolve it.
Combustion reactions aren't limited to just carbon and hydrogen in the hydrocarbon. Alcohols, for example, contain oxygen and burn easily.