Essentially, it is legal to ground the ball to save time. It is usually not legal to ground the ball to save yardage. However, the passer is allowed to throw the ball away to avoid yardage loss if he is outside the offensive tackles and the ball is thrown beyond the line of scrimmage. If he is in the pocket and there is no receiver in the area, or if the ball is thrown behind the line of scrimmage with no receiver in the area, it is considered intentional grounding. The ball is placed at the spot of the foul, along with the loss of down. It is called as if the passer had been tackled at that point. That make the difference clear?