Final answer:
Hackers can gain computer access by exploiting software vulnerabilities, guessing passwords, through tampered software updates, or physical access. The Viagra spam incident was likely due to a software vulnerability or a guessed password.
Step-by-step explanation:
Hackers have several tactics to gain unauthorized access to computers and networks. One common method is exploiting a software vulnerability, where the hacker takes advantage of a weakness in a system's security to install malicious software, like the program causing the computer to send out Viagra spam. Another method could be by guessing the password if the user has a weak or common password. Lastly, hackers can gain access through a legitimate software update by injecting malicious code into the update process, or by having physical access to the computer, allowing them to install malware directly.
In the instance mentioned, it is unlikely the spam was sent due to a legitimate software update as these should have security to prevent tampering. It's more plausible that the attack occurred either through a hacker guessing a weak password or exploiting a software vulnerability, the latter being a common cause of such breaches.