Understanding voltage and current
I like being graphical.

Your hair, when charged electrostatically, acts like small capacitors charged to high voltages. The energy stored in those little capacitors is finite and small, and so it can do little harm to you.

On the other hand, a 220 Vrms outlet has a much lower voltage, but it is an unlimited source of energy. Even acting upon the same load resistance, this is much more dangerous, because all that extra energy means it can cause more heating of your tissues, and therefore more damage.