It could be the wall outlet you're plugging your PC into (if that's what you meant) has severe corrosion, or too many devices plugged into it. Try another outlet to see if you can find one that doesn't cause such problems. You may need to have an electrician install a new outlet, or even do it yourself if you know how and own the home.
If it's an apartment and you find the outlet to be bad, report it to your landlord. They will no doubt be fully willing to replace it because such things can also be a fire hazard as well.
I once was in a friend's apt and plugged his floor lamp into an outlet and it suddenly got very hot and the bulb exploded. I told him to report it immediately to the landlord and they found the outlet to be faulty and replaced it.
These kind of things you don't want to let go, they can be very dangerous. If you hear a click when the PC shuts off, it's probably your PSU overload protection feature shutting it off.