These are all good suggestions, but the problems lies in multiple factors.
1. Your Tone
If you are using a High Gain Tone (A general note is lots of distortion) You will get humming a lot.
2. Your Pickup setting
You will get this humming noise depending on which pickup you are using (The little 5 selector on statocastors and the 3 selector on les pauls). If you are using single Coil Pickups you will get the hum much more. If you are using the Humbucker (dual coil, you can tell because it looks like twice as big a pickup) it will "buck" the hum, leaving you with little or no hum.
3. Your pickups
Basically, your guitar sucks. Cheap pickups hum lots, well-made (generally expensive ones) don't very often.
4. Where the hell you are standing.
If you stand in front of your amp with high gain settings, it will hum and feedback. Don't do that. This applies much more to feedback rather than the hum.
5. Your muting technique
This has been covered by the other guys.
Hopefully you will find ways that help you eliminate the hum, these are just some starting pointers. Putting a noise gate on your amplifier will also help cut down on it. A noise gate only let's sound through if it is loud enough. Essentially, only if you are playing. It gets rid of the excess sound, to a degree. Generally a good one.
Hope this helps.
POW
If the Lord as my light and my path, who then shall I fear?