Final answer:
A virus scanner works by comparing files against a list of known virus profiles.
Step-by-step explanation:
The primary way a virus scanner works is by comparing files against a list of known virus profiles. The scanner checks files for specific patterns or signatures that match known viruses. If a file matches a known virus profile, the scanner will flag it as infected. This method is effective in detecting and blocking known viruses, but may not be able to detect new or unknown viruses.