Depends on when exactly it turns black.

If you can't get into the BIOS-setup it's the motherboard/CPU/RAM.
If you can't boot from a bootable optical disk or USB, it's the motherboard/CPU/RAM.
It could be a corrupted account in Windows or a corrupted Windows.
It could even be heat causing the CPU to heat so the PC turns itself off.

But it seems quite unlikely it's an issue with the hard disk.