in

The best protection is a properly grounded anti-static mat and/or grounded wrist-strap.  However only the most serious PC hobbyists have these.  But you can use the computer case itself as a grounding point to safely discharge static electricity whenever you touch it.

 

The goal is to cut power the PC, but keep the power cord to the computer plugged in.  This may sound counter-intuitive, but the third prong of the power cord is a ground. When the power cord is connected to a properly grounded wall socket the metal frame of the case becomes a grounding point. 

 

For configurations that include a power supply with an on/off switch:  Use the on/off switch to power off the power supply.  The switch will be in the "off" position when the "0" is depressed.

 

For configurations where the power supply does not have an on/off switch:  Connect the power supply to a surge protector or other power strip that includes an on/off switch.  The surge protector must be connected to a wall outlet.  Use the on/off switch of the surge protector to turn power off.