In many reactions one reactant is deliberately or accidentally used in a larger amount than is needed. This reactant is in excess, which means some of it is left over unreacted when the reaction ends. The other reactant is used up completely. It is called the limiting reactant, because it limits how much product can form.
The reaction stops when the limiting reactant has all reacted. This is why the mass of product depends on the mass of the limiting reactant and not on the reactant in excess. Adding more of the excess reactant does not make more product, so the mass of product stays unchanged. Doubling the mass of the limiting reactant doubles the mass of product.
Example: magnesium burns in oxygen to make magnesium oxide, 2Mg + O2 → 2MgO. When 4.8 g of magnesium burns in excess oxygen, 8.0 g of magnesium oxide forms. When 9.6 g of magnesium burns in the same excess of oxygen, 16.0 g forms. The magnesium is limiting both times.
Another example is magnesium reacting with hydrochloric acid. If 2.4 g of magnesium is added to a large excess of acid, the magnesium is the limiting reactant. Once it has all reacted, the reaction stops and no more hydrogen is made, however much acid remains.