Specifying the equation:
C5H12 + O2 --> H2O + CO2
So let's count up the number of atoms on each side:
5 carbons, 12 hydrogens, 2 oxygens for reactants, and
1 carbon, 2 hydrogens, 3 oxygens for products.
Now the number of atoms on each side must be equal, because atoms are neither created or destroyed in the reaction. If you have 5 carbons as reactants, you have to have 5 carbons as products, so:
C5H12 + O2 | H2O + 5 CO2
There are 12 hydrogens as reactants, so you need 12 as products:
C5H12 + O2 | 6 H2O + 5 CO2
But 6 water molecules have 6 oxygen atoms on the product side, along with the 10 that are already there from the carbon dioxide, for a total of 16 oxygens. To get 16 oxygens as products, you need 8 oxygen molecules as reactants:
C5H12 + 8 O2 --> 6 H2O + 5 CO2
...and your equation is balanced!