I turned my pc on, it started up, then it just went off. Now it won't switch on. Could this be the power unit or the on/off switch? Or maybe something else? Any help appreciated. Thanks.
Like VHG says, any number of reasons, although if it switched itself off it's probably not the on/off switch (which would usually be a mechanical failure that would only manifest itself when you press the button).
Power supplies can turn off if they sense a problem. Try turning on again after an age unplugged and see if it does its start and then off again cycle.