First method:
- Turn off the phone by holding the Power key.
- Afterwards hold and press Volume Down + Power button until you see Bootloader menu.
- Then form the menu choose option "FACTORY RESET" using Volume Down to scroll, and Power button to accept options.
- Now wait until your phone reboots.
Second method:
- Turn on the phone by using the Power button.
- Afterwards go to Settings and then to Backup & reset.
- Tap Reset Phone.
- Choose Erase All Data if you are sure you want to clear all your data.
- Select OK to confirm the whole operation.
- Good job!