You can either initiate the process through the Settings, where you should see a BACKUP AND RESET option (I think it was in the ABOUT tab on the S4, but I can't recall...that's where it is on the Note 3).
Or you could go into recovery mode (with the phone turned off, press and hold together POWER + HOME + VOLUME UP until the phone turns on and enters the mode). There you can see an option to Clear Data and do a factory reset. You can move through the items using the volume rocker and selecting/confirming actions with the power button.