Turn the locked HTC phone off.Press and hold the Volume Up, Home and Power button simultaneously until the menu in plain text appears.Press the Volume Down button to " wipe data/factory reset ", and press the Power button to confirm.Confirm " Yes -- delete all user " and finally " Reboot system now ". Now your phone starts to reboot and you can set it up later.Powering off the phone for a few seconds will clear and refresh the RAM, returning the device to normal performance. Press and hold the POWER button until the power options appear. Tap Power Off and wait until the phone powers down completely. After a few moments of the phone being powered off, hold the POWER button to power the phone back on.One of the ways to unlock the HTC phone locked by the SIM card is to contact the carrier provider. You need to know your IMEI number on your phone and have a microSIM card from an active provider. If you are eligible to unlock the phone, the carrier provider will unlock your locked HTC phone for free according to laws.
How do I Reset my HTC phone to factory settings?
1 Power off your HTC phone. 2 Long Press the Power and Volume Down buttons at the same time. 3 When the bootloader screen appears, release the Power and Volume Down buttons. Then press the Volume Down button to highlight FACTORY RESET.
How to fix HTC phone freezes up?
If your HTC phone has a persistent problem like frozen up with no reasons, you can perform a factory reset. Factory reset is also called hard reset or master reset. It will return your HTC phone to its initial state, like you got it and turned on it at the first time.
How do I unlock a locked HTC phone?
You may need to get an unlocking tool such as iMyFone LockWiper (Android). This tool will be able to help you faactory reset and unlock your HTC or any other Android device. It can do a factory reset on a locked HTC easily without any hassle.
What happens when you Hard Reset your Android phone?
A factory reset or hard reset is a practical measure to erase all your data including installed applications, contacts, messages, photos, software, accounts, etc. And the phone will automatically restart and return to its original state. It is an informed way to solve many problems such as we have mentioned in the first paragraph.

Below are two helpful articles on a similar topic 👇
What happens when you reset all settings on an iDevice?What does erase all content and settings do on an iPhone?