Hi, welcome to Android Forums.
The following is an extract from the HTC One user manual :-
Resetting HTC One (Hard reset)
If HTC One has a persistent problem that cannot be solved, you can perform a factory reset (also called a hard reset or master reset). A factory reset reverts the phone back to its initial state — the state before you turned on the phone for the first time.
The following will be removed from the phone when you do a factory reset:
§ Your Google Account
§ All accounts you've added in Settings > Accounts & sync and the data associated with these accounts
§ Personal data that you've created or synced to the phone such as your profile, contacts, messages, email, calendar events, and more
§ System and application data and settings
§ Downloaded apps
Files such as your music, photos, videos, and documents will also be deleted if you select the Erase all data option.
Be sure to back up any data and files you want to keep before you do a factory reset.
A factory reset may not permanently erase all data from your phone, including personal information.
Performing a factory reset from settings
1. Go to Settings, and then tap Backup & reset.
2. Tap Reset phone.
3. If you also want to delete media and other data on HTC One, select Erase all data.
4. Tap OK.
Performing a factory reset using hardware buttons
If you can’t turn HTC One on or access settings, you can still perform a factory reset by using the hardware buttons on HTC One.
1. Press and hold the VOLUME DOWN button, and then press and hold the POWER button.
2. Wait for the screen with the three Android images to appear, and then release the POWER and VOLUME DOWN buttons.
3. Press VOLUME DOWN to select FACTORY RESET, and then press the POWER button.
You can download the full manual here :-
Hope this helps.