Hi,
"Protect" ...
There is no simple protection against all extremes.
First you need to define "against what" you want to protect the pin.
* continous short circuit against GND (or any lower voltage)
* continous short circuit against VCC (or any higher voltage)
* ESD? It usually is difined as: a capacitance, it's charge_voltage and the series_resistance. Maybe the repeat rate.
Against ESD:
A very good protection is:
Pin -- series resistance -- two diodes -- capacitor to GND.
How it works.
The capacitance will slow down the extremely fast ESD pulse. (100p may be sufficient)
The diodes will limit the voltage, but (because of the high current peaks) usually this voltage is beyond the microcontroller specification.
Thus you need the series resistor to keep the current within specified values.
An additional series resistor (at the ESD side) may be useful for high power "surge pulses" to dissipate the energy.
A further big (transil, transzorb) diode may be useful for even higher energy pulses.
Klaus