If your laptop has been attacked by a virus and something goes wrong with it even after you get rid of the virus, it may be worth formatting it. Since formatting completely erases the contents of the hard drive, this is the most reliable and effective way to clean your computer. The procedure for formatting a laptop is very simple today. Manufacturers provide the owner with a copy of the operating system (OS) along with drivers and utilities, or create a recovery partition on the hard drive. However, before proceeding with the formatting, be sure to transfer all data to an external hard drive, CD or DVD, otherwise you will lose it.
Steps
Method 1 of 2: Format the laptop from the installation CDs

Step 1. Back up your hard drive
Formatting your laptop will result in the loss of all information stored on it, so if you want to keep it, you must rewrite the contents of your hard drive to an external hard drive, CD or DVD.

Step 2. Determine which system recovery method is provided by the manufacturer
If you were given installation CDs with your laptop, then you need to use them. If you did not receive any discs with your laptop, then most likely it contains a recovery partition, in which case you should use the second method.

Step 3. Insert the operating system disc into your CD / DVD drive
It usually starts automatically and opens a menu or window with a choice of options. Select the option to install a new operating system.
If the disk does not start automatically, double-click to open “My Computer”, right-click on the icon of the disk with the OS and select “Autoplay”

Step 4. Wait while the disk prompts you to take the next step
If you move away from the computer for a while, the process will pause at the moment when user selection is required. Follow the prompts, be patient, and avoid the temptation to interfere with the process. This may take a few minutes.
If you are formatting your laptop's hard drive, accept the default settings when prompted by the installation disc

Step 5. Wait for the installation process to complete
When the installation of the operating system is completed, the monitor will display a completely clean desktop.
Method 2 of 2: Format the laptop using the recovery partition

Step 1. Restart your laptop
While the computer is starting up, press the F10 key on your keyboard several times in a row. As a result, a menu will appear in front of you, which will offer you a fix or recovery (format and reboot).

Step 2. Select the option to install a new operating system
The advantage of this method is that you don't have to do anything else. The recovery partition will format itself, reboot the OS, install the necessary drivers and programs supplied with your laptop.

Step 3. Wait for the installation process to complete
It usually lasts about 30 minutes.