I am trying to understand differences between RS-232 & RS-485. I just don't grasp what is the core principle behind RS-422 inteference resistance? Is it number of wires (4 instead of 3)? Is it because these wires are twisted?
Twisted wires reduce the inductance because the field inverts with each half twist. An inductive disturbance induced in one half twist will therefore be cancelled by the next half twist.
See this answer for more details.
The reason RS-422 is so much better at rejecting interference is because it is what is known as a Balanced Line transmission system.
In a balanced line system the signal is transmitted twice. Once as a normal "positive" signal, and once as a "negative" signal.
Imagine if you will a signal that is made up of the binary digits 01110010 (we will ignore any line-encoding like Manchester, etc).
The positive signal may be transmitted as, for example:
The negative signal could be:
At the receiving end these two signals are subtracted from each other. As you know, subtracting a negative value from a positive value cancels out the two negatives and is like adding two positive numbers:
Now, when noise is introduced, because the wires are twisted together, the noise is induced the same into both the positive and negative lines in (roughly) equal amounts. So say there is a spike of +3v noise introduced in the middle of our binary sequence. The new sequence would look something like:
So the resultant subtracted values would be:
See how the noise has completely vanished.
This same principle is used in many high-speed communications systems, like USB, Ethernet, HDMI, etc.
It is also used in professional audio equipment where a signal from a microphone has to be as noise free as possible - it's not just a digital thing.
What Stevenh said plus:
In an unbalanced system such as RS232 the signal is ground referenced and any "common mode" signal induced in the circuit will be combined with the signal.
On telephone circuits, which are balanced, the AC mains noise induced can be many Volts while the speech signal is 10's of mV at best. But , because the noise is equally induced on both legs it is ignored by the receiver that looks only at the difference. Unbalance a phone circuit and you get massive levels of mains hum.
If you're interested in digging further into the effects of balanced differential signal paths and managing EM/RF interference I'd highly recommend reading over some of Bill Whitlocks many papers on the topics at Jenson Transformers.