If a virus causes my computer to automatically shut down when it is turned on and makes it unable to be turned back on, how does a person destroy the virus without destroying the infected computer's drive or files?
You can boot from an anti-virus CD/DVD (something like Norton Antivirus, McAfee, etc). Just load the disc and hit F10 many times after pressing the power button. (It's possible your PC has another button to pick the boot drive). This will prompt you where to boot from (Hard drive, CD or USB). Then pick the CD/DVD. There should be an option on that antivirus disc to check your system for viruses and remove them. If it doesn't have this option, search for one that does (try google anti-virus boot disk/drive). You could also boot off a USB thumbdrive that was configured to boot and has antivirus software loaded on it.
I'm assuming here that you are using a Windows environment.
It is possible to use a live Rescue CD, it's a special bootable CD (or USB pendrive) loaded with an antivirus that can be run without the whole operating system. A couple of sample lists of those CD's can be found here or here.
To use one of them, you must download the image, burn it on an empty CD (or on a USB pendrive if your computer can boot from it), and boot it instead of the default hard disk.
It is also possible to use a Linux live distro (also bootable from a live CD/USB) to perform basic file backup/recovery, but if your system was infected, be sure to retrieve only the files that you are 100% sure to be clean, or you could find yourself with another troublesome situation when you will restore them. Basically any Linux distribution can be booted from a live medium, so the choice is yours, a light and easy to use one could be Lubuntu in example.
When you have performed all your cleaning and file saving, be sure to install and use an updated antivirus software on your system to prevent this kind of problems. Preventing is always better than curing.