For resetting your used tablet, follow these steps:
Open the Settings and choose System.
Look for and select Reset options.
Choose Erase all data (factory reset).
At the bottom, select either Reset Phone or Reset Tablet.
You’ll be prompted for confirmation, select Erase Everything.
Your used tablet should restart and might display a progress screen showing that it’s erasing the data.