If the computer is a laptop, try it on batteries. If you don't get the problem on batteries, it is a power supply issue.
Either way, try a different plug in the same room if you have one or a different plug on the same floor. Often the plugs for each floor of a house will be on a different circuit connected to it's own fuse in the distribution board. It may be that the mains circuit for that floor is damaged or faulty - your friend should get a competent electrician to look at it ASAP as it could damage things that are plugged in or even cause a fire.
If it is just the one plug, again get someone to have a look at it and get it fixed.
Grounding issues and other faults are dangerous in house wiring - get it looked at and fixed by an electrician as soon as possible. In the mean time, do not use that part of the wiring. In fact remove the fuse or otherwise disconnect that part of the wiring.
If the computer is a desktop rather than a laptop, I do strongly recommend using an extension that filters spikes from the power, it does help stop damage to the computer and other electronics. Get one that has a decent guarantee not a cheap one.