It's not usually a virus or malware. What happens is that Windows tries to load your user profile and it has trouble. When it has trouble it tries to make a backup copy and then reload it, however it seems like 50% of the time it messes this process up and results in that error. There's not much you can do to prevent it as it is usually pretty random.
I would advise running a malware scan on the computer once it comes up just to make sure you are okay. I like using MBAM Antimalwarebytes:
1. If you can get on the Internet from your computer, please download MBAM AntimalwareBytes from http://www.bleepingcomputer.com/download/anti-virus/malwarebytes-anti-malware
2. Go thru the short installation wizard, accepting all the defaults.
3. At the end of the installation, make sure both checkboxes (one for updating and one for starting the program) are checked, but CLEAR the box for the Pro Trial.
4. The program will update and then start.
5. Choose Quick Scan and then click the Scan Now button.
6. The scan will take several minutes to complete.
7. When it is complete, click the Show Results button.
8. Make sure everything in the list is checked (it should be checked by default) and then click Fix Selected.
9. The threats will be removed from your computer.
10. Close the log file and reboot your computer.