There's a huge number of levels involved with a virus scanner.
Many aspects exist. Some of these are:
- Removing black-listed files. Which can be mantained by you and synchronized with the program routinely. Websites also exist that give out free lists of blacklisted filenames.
- Removing potentially dangerous looking files.
- Removing dangerously behaving files.
- Protecting yourself from viruses. As some viruses will attempt to knock out the very virus scanner that's intended to detect it.
There of course many more aspects, but these are the fundamentals I know of. All of these aspects of a virus scanner are not implemented in any special way. It's using C code that you should know if you are an experienced C programmer. For instance, synchronizing a blacklist involves sockets. Removing these files involves a basic directory walk and clean. So pick up a book and start reading.
The finer details, like how to make the program protect itself, and how to recognize a virus by behaviour, would involve some more specific algorithms. I can't help you there, but I'd suspect most of these algorithms are secrets within the market, and wouldn't be publicly accessible for many reasons. A large consideration is the fact that it would be helping viruses stay a step ahead of the virus scanners...