1- Go to your app drawer, home screen or where the settings option is.
2- On the settings menu select Backup and reset.
3- On Backup and reset, select Factory data reset.
4- If device is pass lock protected, unlock it and proceed, the device will restart and install the factory image of it.