Could be either or both. They are somewhat tied together.
Heat sensors will shut it down. The PSU, assuming it's fairly modern, monitors the voltages and will shut the PSU down if they go out of spec.
As heat rises, resistance in the circuits goes up requiring higher power to maintain the same voltage which creates more heat which raises the resistance and causes power requirement to go up, etc. until it reaches one of the limits that shuts it down