Anti-virus (AV) software scans files for certain patterns or signatures of known viruses. Virus authors continually release new and updated viruses, which is why it is important to always have the latest AV version installed on your computer.
Set your AV software to scan your system automatically. And remember to manually scan files you get before opening them. These include files you download from the Internet, email attachments, and files on USB drives and other media.