Bubbles are indicative of the presence of gas. Nothing more. Nothing less. They do not indicate fermentation activity or infection. Liquid will off gas and reabsorb gas with temperature (or pressure) change alone. Please do not mistake bubbles for anything other than the fact that you have created a gassy liquid.
Use a hydrometer to determine whether fermentation is active (no change in readings over the course of 3-7 days means fermentation is complete).
Use your palate to determine whether an infection is present (it is highly unlikely that infected beer will hurt you, but it is somewhat likely that the flavor will be unpleasant).