Do you feel static electricity sparks when you shake hands or grab a doorknob?
The same goes for electronic device. Sometimes it destroys parts.
To prevent this we use TVS-diode.
As you can see above picture. High voltage are cut off.That is what you want. We want protect our board from over/under voltage. Attach the TVS diode to the cable or wire contact location.
For example, RS232C connecter needs TVS-diode.
RS232C circuit use +/- 10V. So you must select right TVS-Diode.
This TVS-diode fit RS232 or RS422 circuit.
This is another TVS-diode data sheet. it saids only -3V to +9V pass and others cut off. I thinks this TVS-diode for GPIO port.
Major automation maker already use TVS-diode. This is inside of Major maker's PLC inside picture.