All heroes have two values, attack animation and cast animation, and two sub values (start frames and ending frames) associated with each of them.
Take for example
Drow Ranger.
The values mean that, when she makes an attack using her base attack speed, it takes 0.7 seconds before her arrow actually appears, and 0.3 seconds afterwards to complete the animation. These times decrease as attack speed increases. When people attack and then move right after, they're canceling the ending animation in order to shave precious seconds off their attacks, allowing them to attack and move at the same time with greater efficiency. This is known as "orb walking", which referred to heroes with attack modifier orb effects (Drow's Frost Arrows, Enchantress' Impetus) and is now generalized to basically mean attack moving with minimum delay between every action.
The same is true for cast animation, which is the minimal amount of time it takes for a spell to activate, and how much time you can shave off by moving immediately after. Channeling spells, obviously, can't be animation cancelled. I believe some other spells can't be cancelled through normal means, you'd have to use the 'S' key to specifically give a stop command.