The buzz is a ground loop. Power mains carry a lot more than power. They carry RF as well. Fix the ground loop and you should be good.
This^^^
Poorly made cables can also act as an antenna, though it's less common.
A ground loop means that your signal is "seeing" two paths to ground. I'm assuming, perhaps wrongly, that you're using pedals?
There are a lot of workarounds, but the easiest and most effective solution is to power your pedals with a high quality, isolated power supply, like the Voodoo Labs products. This prevents ground loops from happening with more than one pedal, etc. Cheap pedal power supplies don't do this well.
If you're using something like an ABY box to switch between two amps, there's another common source of ground issues. That gets solved with an isolation transformer between the switcher and one, not both, of the amps.
If you're using your amp's effects loop, that can be a whole 'nother can of worms.
How do you figure out what the cause is? Simple. Disconnect everything and plug the guitar straight into the amp. Then add each pedal, one by one, until you find the culprit. The same process goes for effects loops, though that's sometimes a little harder to solve.