For example, this equation for the reaction between iron oxide and carbon to form iron and carbon dioxide is unbalanced with respect to mass:
Fe2O3 + C → Fe + CO2
The equation is balanced for charge because both sides of the equation have no ions (net neutral charge).
The equation has 2 iron atoms on the reactants side of the equation (left of the arrow), but 1 iron atom on the products side (right of the arrow). Even without counting up the quantities of other atoms, you can tell the equation is not balanced. The goal of balancing the equation is to have the same number of each type of atom on both the left and right sides of the arrow.
This is achieved by changing the coefficients of the compounds (numbers placed in front of compound formulas). The subscripts are never changed (small numbers to the right of some atoms, as for iron and oxygen in this example). Changing the subscripts would alter the chemical identity of the compound!
The balanced equation is:
2 Fe2O3 + 3 C → 4 Fe + 3 CO2
Both the left and right sides of the equation have 4 Fe, 6 O, and 3 C atoms. When you balance equations, it's a good idea to check your work by multiplying the subscript of each atom by the coefficient. When no subscript is cited, consider it to be 1.
It's also good practice to cite the state of matter of each reactant. This is listed in parentheses immediately following the compound. For example, the earlier reaction could be written:
2 Fe2O3(s) + 3 C(s) → 4 Fe(s) + 3 CO2(g)
where s indicates a solid and g is a gas