Warning: This will remove ALL data on the phone (but not the MicroSD card). There are two ways to do this:
1) From the home screen, press Menu - Settings - Privacy - Factory data reset - Reset phone. It may ask for a password. Then select Erase everything
2) If you phone has completely frozen and you want to hard reset it, turn the Power off or pull the battery out and put it back in. Then hold down the Volume Up key. Then press and hold the Power key. The phone will turn itself on. When you are presented with a menu, choose Clear Storage by pressing the Volume Down key. Press and release the Power button. To confirm, press Volume Up for Yes or Volume Down for No.