Byproducts
Often it's normal to have a different mass if the mass of your products doesn't take byproducts into account. Let's say, for example, that you combined a carboxylic acid with an alcohol to make an ester. This reaction also produces water which, from your point of view, is a useless byproduct. The main product of the reaction, the one you really want, is the ester. Nonetheless, if you only measured the mass of your ester, it would be different from the mass of your reactants because that doesn't take the mass of the water into account.
Losses
Another reason why the mass might be different has to do with the procedure. You probably had to transfer chemicals from one flask or test tube to another at several points during your experiment, and in each case a little bit of product and/or reactant probably remained clinging to the walls of the test tube or flask. It's not possible -- or at least very difficult -- to make sure that 100 percent of the contents of a reaction vessel are transferred properly, so you might well have some minor losses.
Purification
Sometimes it may happen that the mass of your product is greater than the mass of your reactants. If so, this clearly suggests experimental error. Usually, your purification procedure -- the steps at the end of the experiment where you purify your product -- are at fault. If your product is contaminated with a remaining quantity of solvent or reagent, it will make the mass of your product appear to be greater than it really is.
Other Errors
If you spill or overturn a flask and lose some of your product, the losses will also skew your results. It's also possible you may have measured the mass of your products or reactants incorrectly. It's important to note that in many cases you're primarily interested in the yield of only one product -- the molecule you wanted to make in the reaction. For that reason, it's generally better to use the number of moles, rather than the mass in grams, to calculate the yield of the reaction since the mass of byproducts, like water or carbon dioxide, is not important.