On every champion's autoattacks, there is a windup animation, the hit (or projectile launch for ranged characters), and a cooldown or follow-up animation. The follow-up animation is entirely cosmetic and not required at all, so it does not stop you from doing other actions. Any other action taken, whether its movement or casting a spell, will cancel the follow-up animation. Cancelling your the follow-up animations doesn't decrease the time until your next attack, but by utilizing the time between your attacks you can optimize your damage output, by doing movement and spell casts between autos. If you take the time between attacks to move away from jungle camps, you can often briefly get out of range of melee monsters and cause them to start their attack animations over again, indirectly reducing the damage you take.
To practice this, simply auto a monster, then after your hit does its damage, input a movement command away from the camp, then attack it again. Get a feel for the timing between your attacks. Make sure you don't cancel your attacks before they do their damage.
Also note that on Kha'zix in particular I'm pretty sure all your spells can be cast within the time between two autoattacks without delaying the second one, so try to cast your spells after autoattacking so that you don't cancel an autoattack with a spell cast.