it might gelp to ground yourself (touch the metal part of the case on the PC) then, open the case and use a can of compressed air to remove dust .etc.
Or get a new CPU fan.
What do you mean by PC shuts off. A blue screen, then restarts or Blam... it goes off.
Also, check your power cables