Often, players of the non-infringing team are quick to spot the referee is playing on, and let their teammates know so they can take full "advantage" of the situation. The advantage a team can gain from can be either territorial or tactical. Territorial means just that - a gain in territory.
But the advantage has to be clear and real, so that if the non-offending team kick the ball down field but straight into the arms of the opposing team's most potent striking weapon - think Ben Smith or Julian Savea - a good outcome to them is unlikely to occur and the referee would blow the whistle for the original infringement.
On the other hand, if Smith or Savea are out of position and the chase by the kicker's team is good, then the referee may consider that team has gained a good advantage away from the original infringement.
Tactical advantage is a bit more problematic.
A tactical advantage means the non-infringing team has the freedom to use the ball as they wish.
An infringement might be followed by several "pick and goes" or a promising backline movement which may not have reached the advantage line before the referee has to decide whether the advantaged team had sufficient opportunity or if we go back for the original infringement.
Minor infringements usually result in a shorter application of advantage than more serious infringements.
After an infringement which would result in a scrum, most referees consider that once a team has passed the ball twice then they have had sufficient tactical advantage and play should continue.
If the infringement would result in a penalty kick, especially one for goal, the referee is likely to play a much longer advantage which may cover a wide area or go through several phases before he decides enough has been gained or it's time to call it back.
As you can see, the referee has wide discretion when making decisions about whether or not an advantage has been gained.
This is because the advantage law takes precedence over most other rugby laws.
However, there are occasions when he cannot apply the advantage law. If the ball or a player carrying it touches the referee, advantage cannot be played. In reality, these days if the contact is out in the open with no opponents close by, the referee should allow play to continue.
If the ball comes out either end of the scrum tunnel without being played by a front rower, then advantage cannot be applied. Nor can it be applied if the scrum wheels beyond 180 degrees.
Safety in scrums is a high priority these days so if a front row player is forced up in the air, with feet off the ground, the referee cannot play advantage and should whistle to stop play immediately. Likewise, if a scrum collapses, the referee should whistle immediately to stop play and not play advantage, even if the ball is about to emerge from the scrum.
If there is more than one infringement by a team, the referee can keep playing advantage unless there is still no advantage coming from the second infringement. In this case the referee applies the sanction to the offence which is most advantageous to the non-infringing team.
If an infringement by one team is immediately followed by an infringement by the other team, the referee blows the whistle and goes back for the first infringement.
For any referee, using the advantage, resulting in fewer stoppages, is one of the more rewarding aspects of refereeing. And if the advantage results in a try to the non-infringing team that feeling is enhanced even further.