The correct response that helps prevent your computer from becoming infected with malicious code is:
Install and regularly run updated antivirus software.
This practice is crucial for maintaining the security of your computer against malware and other threats. The other options, such as opening emails with attachments from strangers or downloading software from unverified sources, can increase the risk of infection.