After using a virus scanner to clean my Mac, it will no longer start I had been getting a lot of pop-ups and browser ads on my Mac and I suspected it might be due to a virus so I installed Avast. After running a virus scan, Avast found 10 viruses and 18 warnings, which I told it to delete.

It might have deleted some system files because now my mac will not start. If shows the Apple logo on boot and then it shows an error logo with the processing bar and that's as far as it ever gets.

Please tell me how I can get my Mac back in to a working state?
Since we do not know what was deleted, I suggest you 

Press Command-R during startup  

That will start from the OS X Recovery System 

to repair your OS.