How does electron spin change instantaneously without violating inertia principle? The inertia in one of the main properties of matter. That is why all process in macro world do not happen instantaneously.
What I do not understand is how we should apply this general idea of inertia to quantum world? Usually people say that electron spin change instantaneously from one direction two another. But this violates the principle of inertia. 
 A: Spin of an electron is measured as a magnetic property. You should not visualize it as an electron "spinning" around its axis, which is what you seem to indicate if I'm not mistaken. Electrons are considered to be point particles. Also, the spin of an electron never changes instantaneously. For example, changes in the electron's spin in the Stern-Gerlach experiment is a dynamical process due to the coupling of the magnetic moment due to the electron spin to the inhomogeneous magnetic field of the Stern-Gerlach magnets. The change in angular momentum of electron spin is compensated in the magnets.
Most importantly, it is important to realize that instantaneous is meaningless in QM, since this can never be accurately determined. To determine a change in a system requires two measurements, which themselves take time to complete. In this way it is impossible to say when things "exactly" occurred. That being said, in QM you can determine the time-scale over which the dynamics occurs.
A: Your intuition about inertia is essentially correct. The spin state of an electron does not change instantly. If the electron is in the spin-up state then the z-component of its angular momentum is $\frac{1}{2} \hbar$. If it is in the spin-down state then its angular momentum is $-\frac{1}{2} \hbar$. Classically, angular momentum cannot change instantly, just as linear momentum cannot. More quantitatively, the rate of change of angular momentum is equal to the torque applied. Analogously, in quantum mechanics, one can apply a "torque" on the electron spin degree of freedom by placing the electron in a magnetic field. This will cause the spin to precess into a different orientation. To double the precession speed one must double the strength of the applied magnetic field.
