Well, in order to ground yourself while working on a computer to prevent static electricity damages your computer is you have to constantly touch the metal part of your computer case (have to be bare metal, coated paint won't do). AND your case must be connected to a grounded outlet, otherwise it will not work.
In order to do ground yourself:
1. Connect the power cord to the grounded outlet, but don't turn the power supply on.
2. Keep touching the case while working (sometimes if you have to use your both hand to do your work, just remember to touch it again after that).
3. Avoid working on the carpet as it will build up your statics electricity pretty fast.
4. Try wearing something less polyesters, wools, silks... Cotton will work. Avoid wearing socks.
5. Last but not least, get an antistatic wristband (somethings like this: http://www.newegg.com/Product/Product.aspx?Item=N82E16899261005)
Good luck.