Balance your chemical reaction, which involves making sure you end up with what you started with. As an example, consider the reaction of calcium chloride (Ca2Cl) with sodium hydroxide (NaOH). Write the reaction as CaCl2 + NaOH --> Ca(OH)2 + NaCl. Notice, for example, that there are two chlorides on the right but only one on the left. Add "coefficients" in front of each reaction until you've balanced the reaction. For the example, this should be CaCl2 + 2NaOH --> Ca(OH)2 + 2NaCl.
Calculate the "molecular weights" of each of your reactants and products. Consider, for example, calcium chloride, which contains one calcium and two chlorines. According the periodic table, calcium has a weight of 40.08 atomic mass units (a.m.u.), while each chlorine weighs 35.45 a.m.u., for a total molecular weight of 40.08 + 35.45 + 35.45, or 110.98 a.m.u. You should get 40.00 a.m.u. for sodium hydroxide, 74.09 a.m.u. calcium hydroxide and for 58.44 a.m.u. sodium chloride.
Determine the amounts of your reactants in "moles" (see Tips). Imagine you have 100 grams of calcium chloride and 100 grams of sodium hydroxide. Since one mole of calcium chloride weighs 40.08 grams, you can set up a "conversion factor" of "1 mol CaCl2/40.08 g CaCl2." Multiply this out as 100 g CaCl2 x (1 mol CaCl2/40.08 g CaCl2), cancelling out as you go, to determine that you have 2.5 moles of calcium chloride. Using this guideline, you should find that you have 2.82 moles of sodium hydroxide.
Determine your "limiting" reagent, that is, which of the reactants will run out first, thereby ending the reaction. While it would appear from the molar amounts of each reactant that the calcium chloride, only 2.5 moles in quantity, would be limiting, this is actually not true. As per the balanced equation, two moles of sodium hydroxide react with each single mole of calcium chloride, so sodium hydroxide will run out first.
Calculate theoretical yield. According to the balanced reaction, adding one mole of calcium chloride to two moles of sodium hydroxide should produce one mole of calcium hydroxide and two moles of sodium chloride. Since sodium hydroxide is limiting, this means that the reaction should produce exactly as many moles of sodium chloride and half as many moles of calcium hydroxide as there were sodium hydroxide to begin with, or 2.82 and 1.41, respectively. Converting these amounts back to grams using the molecular weights of these compounds, you'll find that the example reaction between 100 grams each of calcium chloride and sodium hydroxide should yield 164.80 grams of sodium chloride and 104.47 grams of calcium hydroxide.