The following steps are intended for the Motorola Moto X.
Tap and drag the Notification Bar down.
Tap the Settings icon.
Tap Backup & Reset.
Tap Factory Data Reset.
Tap Reset Phone.
Tap Erase Everything.
Once the phone restarts, it will need to be set up for the first time.