Devices such as wrist straps, anti-static mats.. work by slowly draining the electrical charge on your body so that when you begin working on the PC, you minimize the risk of "zapping" a component by mistake. The 'Zap' that you hear is the discharge of excess electrons. i.e. your body has a negative charge after rubbing your feet on the carpet... the pc is neutral. that's why you hear the zap... the giving off the extra electron.
Actually i should modify my last statement by stating if you don't have such a tool i.e. anti-static wrist strap, then it's preferable to touch a metal post in your home (something that's GROUNDED) before working on your PC . When you unplug a PC and open up the case, you're working on a ungrounded device... and if your body had built up a sufficient static charge, the discharge could be fatal enough to harm a component inside.
That is the whole purpose of the aforementioned tools.