Viruses usually attack the OS and applications, leading to possible data loss and/or corruption. If a virus affects your system, you may have to reformat the OS partition (or the whole drive), but you shouldn't have to reformat the data partition. However you may have to restore the data that was lost or corrupted. Again nothing beats regular backups. Important data should be backed up to an external device which should be kept separate from the PC. The hard disk could also fail, the PC could be stolen or damaged, etc.