There's a slight bit more to it, and it works especially on abillties with casttime.
Every animation consists of 3 parts:
The windup.
The resolve point
The backswing.
The resolve point is the point where damage, cc or whatever actually get applied or the projectile actually is lounched.
The _windup _is what happens befor that, and for spells it is also known as 'casttime'.
The backswing is what comes after the resolve point is for aesthetics only.
What you normaly do with animation canceling is to cancle out the backswing part of an animation, so you wait till your AA/skill resolves properly and then you already give in the next comand instead of waiting for the full animation to finish.
You can cancle animation befor the resolve, but that ends in actually cancleing the full action as you won't get to the resolve point. A common mistake is beeing to hastey, especially when it comes to AAs, resulting in unintenditly canceling full attacks.
Especially on ranged champs, the animations can be missleading, as the resolvepoint is often after the visual launch of the projectile.
An important thing to note is also that animation canceling has nothing to do with AA resets, atleast not directly. Even if you cancle the backswing of your AA, your next AA won't **resolve **faster. The time between two AA RESOLVES is fixed by your AS. What animation caneling does is allowing you to use the time in between two AAs more effectively, like weaving in spells or repositioning.
AA resets are a different mechanic of specific skills, mostly empowered AAs, mobillity tools and some AA steroids, like Nauts W.
Some abillities have partial resets, which only resets some % off the attack timer, mostly AA steroids and mobillity tools.
Now some people might say 'bu-bu-but riven!'.
Yea, riven combines resets and canceling. Her Qs partially reset the AA timer which was ment for her to feel more fluid and normaly has not that much impact because the Q animation is somewhat long, so you can't use the reset that well. However, if you animation cancle, you can now use the reset to it's full potential.