There was once a virus that would change CRT monitor settings, on certain CRTs it could shift the refresh rates to such that it would kill the monitor. Then there are the various BIOS trashing viruses that went around. Erase, corrupt or otherwise muck with the BIOS and that would prevent the PC from booting, and at a time that recovering BIOSes meant replacing the BIOS chip.
Software can damage hardware - but it is incredible rare now a days. Generally, most people make no distinction between the software and the hardware, so damaging a computer for most people means damaging Windows, a task that isn't particularly difficult.