Intentional grounding is a penalty against the quarterback when he throws the ball while inside the pocket to an area without a receiver in it. This is a 10-yard penalty and results in a loss of down.
If a quarterback is being pressured he will often simply throw the ball away to avoid being sacked. This is only allowed if the quarterback is outside the pocket (also called the "tackle box"--the distance from one offensive tackle to the other at the beginning of the play) and if the ball makes it past the line of scrimmage. If the quarterback is inside the pocket and an incomplete pass is thrown to where there is no receiver, there will be a 10-yard penalty or penalty at the spot of the foul, depending on which is a greater loss. The team will also lose its down. This essentially ends up being the same as if the quarterback were sacked.