Put the CD/DVD in that has the operating system. Go into the BIOS before the system boots and change the startup option so that it boots from the CD/DVD. That will allow you go boot in safe mode and run an anti-virus program or restore your system.
Or....
You can just tap F8 during the BIOS boot up to take you to the option to boot Windows in Safe Mode.