There are rules associated with baserunners and how they run the bases. For example, we've already learned how baserunners must touch each base in order starting with 1st base, 2nd base, 3rd base, and finally home plate to earn a run.
Tagging up is something baserunners do when there are less than two (2) outs, and a batter hits a fly ball (a baseball that is hit high and into the outfield). If an outfielder catches the baseball, the runner must touch the base he was previously at. Once the baseball is caught by the fielder, the runner is cleared to go and will try advancing to the next base.
If the runner advances without tagging up once a fly ball is hit, and the baseball is caught, the runner must go all the way back to his previous base before the fielder at that base gets the baseball. The reason the runner must go back to his base if the baseball is caught is because he is not entitled to that next base, since the batter is out and cannot advance. However, if the runner tags up, he can take advantage of the baseball being so far in the outfield to run safely to the next base.
Sometimes, if the runner can clearly tell that an outfielder is not going to be able to catch the baseball, he will advance bases without tagging up, since he predicts it will be a fair hit which entitles him to the next base anyway. However, this is something of a gamble. If the baseball is caught by the outfielder, he must run back to his previous base and risk being thrown out.
When Tagging Up Doesn't Matter
Tagging up is usually only done when there are less than two (2) outs. If there are two (2) outs, the runner will usually just run to the next base without tagging up. If the baseball does end up being caught, the half-inning will be over and the baserunner's position won't matter anymore. If it doesn't get caught, then the runner will have had a good lead in advancing the bases.