Now that I think about it I really don't know how electricity works
How do you know if it is dangerous to mess with components? What I'm trying to ask is, how do you know when things are OK to touch?
For example, I thought if you touch your pc components while it is running you will get electrocuted. However, I saw a video where some guy is touching his bare 360 while it was powered: http://www.youtube.com/watch?v=T9x3I1nRn-Y
Another question, when do you know you have to ground something? How does "grounding" work?
You shouldnt be touching stuff while its running unless you have a specific purpose in mind, like checking the fans or using a multimeter to check voltages.
The voltages inside a computer are pretty low, nothing is over 12V and most things are around 1-3V so its pretty safe for you in there, but the bigger issue is you shorting two things together and hurting them. The heatsinks you see him touching in that video do not carry electricity so they are safe to touch though they may burn you.
When you are working on the system, you want to be grounded, you can do that by touching the case which lets the extra charge on your body go into the metal of the case and the PSU. This makes you the same potential level as everything else in the case, when you get a normal shock from building up static electricity its usually on the order of 10-50kV which is why you want to touch the case as it brings you down to 0V relative to the case.
If you are working around sensitive electronics that are low power and low voltage you want to be grounded so you can shock any of it and damage it. If you are working around high voltage you really dont want to provide a nice path to ground for all that energy, so you dont want to be grounded.
Additional comments to add to those al;ready posted.
working or touching the insides of the power supply would be a different story, a good shock or burn is highly possible.
Touching the case only applies if your case is metal and grounded. I've seen some case use isolating rubber gromments on thepower supply to reduce vinration noise. These grommets can insulate the case from ground leaving you at a potentially harmful voltage level. Plastic, lexan, plexiglass, glass, acrylic... cases would not be grounded no matter how the power supply is mounted.