Denying in Dota 2 is like getting a last hit on a creep, except instead of an enemy creep it's your own. Pressing A then left-clicking a creep that is under 50 percent health will deny it, granting a myriad of bonuses. Denying is crucial to winning any lane, so study up before going out there.
Why You Should Deny
The concept of killing your own allies can be hard to grasp, but the benefits of denying far outweigh the cons. The first and most basic reason to deny is that it prevents enemies from getting a last hit. Last hits grant gold, but if you last hit your creeps before the enemy they get nothing. In this way one deny effectively takes 40 gold out of their pocket, so 10 denies could mean a 400 gold difference for your opponent.
Denying doesn't only prevent the enemy from gaining gold, it also steals away XP. A denied lane creep only gives 25 percent of the XP it would normally give, and furthermore it gives 25 percent of the XP to you, numbers which quickly add up to a level advantage. The last benefit of denying, lane equilibrium, isn't as quantifiable yet still is extremely helpful to winning a lane. Denying helps keep the lane from pushing closer to the enemy tower, meaning you'll have a much safer lane as a result.
How to Deny
The default settings of Dota 2 require you to press A then left-click to deal damage to ally units. However this can be easily changed by opening settings, going to Options then checking "Right-Click to Force Attack" which allows for easy, right-click denies like with normal last hitting.
Once you have your preferred settings locked in, you can start denying creeps. You can only deal damage to allied lane creeps if they drop below 50 percent health, so wait till they get low then last hit them like any enemy creep. It's a good idea to "prep" creeps for denying by hitting them a few times as they get low, because this lets you get both a deny on an allied creep and a last hit on an enemy one.
Other Deniable Units
Hero controlled units, towers, and even allied heroes can all also be denied under specific circumstances. Towers can be denied when under 10 percent health, and denying a tower yields less gold for the enemy team. Heroes can also be denied, but only under 25 percent health and only when under the effects of some spells. Spells like Doom, Venomous Gale, Shadow Strike and a few others all allow for an allied hero deny. Denied heroes grant no gold or XP to the enemy team.
Photos courtesy of Valve