Option 1... Reset the computer...
Windows 10 actually has a built-in method for wiping your PC, and restoring it to an ‘as new’ state. You can choose to preserve just your personal files or to have it erase everything.
To do this go to "Start", then "Settings". Next choose "Update & security" and then "Recovery" Here click "Get started" and select the option you wish to use. From here just follow the on-screen instructions to restore Windows 10 back to how it was upon leaving the factory.
Option 2... Securely format the computer...
If you’re selling, or giving way, your computer to someone else, then it is better to securely erase the hard drive, before reinstalling Windows 10. This will prevent any old data from being recovered...