H_2+O_2rarrH_2O
Notice the imbalance of atoms. On the left side, the reactant side, there are 2 hydrogen atoms and 2 oxygen atoms. On the right side, the product side, there are 2 hydrogen atoms and only 1 oxygen atom.
An important thing to remember when balancing equations is that the molecules themselves may not be changed—only their coefficients can. For example, we can change H_2O to 3H_2O but we can't go from H_2O to H_3O.
In order to deal with the original imbalance, the 2 oxygens on the left and 1 on the right, we can change the coefficient of the H_2O molecule from 1 to 2.
H_2+O_2rarr2H_2O
Now we have the same amount of oxygens on each side, 2, but we have an unequal amount of hydrogen—there are 2 on the left and 4 on the right. We should achieve the least common multiple of the existing numbers, which is 4. We can make the H_2 on the left have a coefficient of 2, giving us the 4 hydrogens that we need on that side of the equation, to match the 4 on the right.
2H_2+O_2rarr2H_2O