How do you restore a sony laptop back to factory settings?

Basically my laptop has a virus so keeps crashing when I go on some programmes so wondered how to restore it back to factory settings
4 answers 4